Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static Bitmap bitmapFromFile(File file) throws FileNotFoundException { return BitmapFactory.decodeStream(new BufferedInputStream(new FileInputStream(file))); } }