Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { private static Bitmap createScaledBitMap(Bitmap src, int destWidth, int destHeight) { // TODO Auto-generated method stub if (src == null) { return null; } Bitmap dest = Bitmap.createScaledBitmap(src, destWidth, destHeight, false); if (dest != src) { src.recycle(); } return dest; } }