Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class Main { public static Bitmap loadResBitmap(String path, int scaleSize) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = false; options.inSampleSize = scaleSize; Bitmap bmp = BitmapFactory.decodeFile(path, options); return bmp; } }