Here you can find the source of getBitMapFromStream(String filename)
public static Bitmap getBitMapFromStream(String filename)
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap getBitMapFromStream(String filename) { Bitmap bitmap = null;//w w w . j a va 2 s. com try { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = false; bitmap = BitmapFactory.decodeFile(filename, options); System.gc(); return bitmap; } catch (Exception ex) { return null; } } }