Java tutorial
//package com.java2s; import java.io.File; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap fileToBitmap(String filename) { try { File f = new File(filename); if (!f.exists()) { return null; } Bitmap tmp = BitmapFactory.decodeFile(filename); return tmp; } catch (Exception e) { return null; } } }