Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; public class Main { public static Bitmap decodeFileForRGB(String path) { BitmapFactory.Options opt = new BitmapFactory.Options(); opt.inPreferredConfig = Config.RGB_565; opt.inSampleSize = 2; opt.inJustDecodeBounds = false; return BitmapFactory.decodeFile(path, opt); } }