Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap zoom(Bitmap source, float wf, float hf) { Matrix matrix = new Matrix(); float sx = wf / source.getWidth(); float sy = hf / source.getHeight(); matrix.postScale(sx, sy); return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), matrix, true); } }