Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import java.io.FileInputStream; import java.io.FileNotFoundException; public class Main { public static Bitmap getImageByFile(String uri) { try { FileInputStream fis = new FileInputStream(uri); return BitmapFactory.decodeStream(fis); } catch (FileNotFoundException e) { e.printStackTrace(); return null; } } }