Android examples for android.graphics:Bitmap Load Save
Read Bitmap from file name
import java.io.BufferedInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getInternalBitmap(Context c, String filename) { Bitmap b = null;// w ww . ja v a2s.co m try { FileInputStream fis = c.openFileInput(filename); BufferedInputStream buf = new BufferedInputStream(fis); b = BitmapFactory.decodeStream(buf); } catch (FileNotFoundException e) { e.printStackTrace(); } return b; } }