Android examples for android.graphics:Bitmap Load Save
get Bitmap From Stream
import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getBitMapFromStream(String filename) { Bitmap bitmap = null;//from www . ja va 2s . co m try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = false; bitmap = BitmapFactory.decodeFile(filename, options); System.gc(); return bitmap; } catch (Exception ex) { return null; } } }