Java tutorial
//package com.java2s; //License from project: Open Source License import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.text.TextUtils; public class Main { public static Bitmap decodeBitmapFromFile(String pathName, BitmapFactory.Options opts) { if (TextUtils.isEmpty(pathName)) { return null; } return BitmapFactory.decodeFile(pathName, opts); } }