Java tutorial
//package com.java2s; import android.graphics.*; public class Main { public static Bitmap scaleExistingBitmap(Bitmap bm, float scaleWidth, float scaleHeight) { int width = bm.getWidth(); int height = bm.getHeight(); Matrix matrix = new Matrix(); matrix.postScale(scaleWidth, scaleHeight); Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false); return resizedBitmap; } }