Java tutorial
//package com.java2s; import android.graphics.*; import android.content.*; import java.io.*; public class Main { public static Bitmap loadScaledBitmap(Context context, String bitmapFilePath, int widthDp, int heightDp) throws IOException { //create movie icon Bitmap bitmap; bitmap = BitmapFactory.decodeStream(context.openFileInput(bitmapFilePath)); bitmap = Bitmap.createScaledBitmap(bitmap, widthDp, heightDp, true); return bitmap; } }