Java tutorial
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap scaleWithXY(Bitmap src, float scaleX, float scaleY) { Matrix matrix = new Matrix(); matrix.postScale(scaleX, scaleY); return Bitmap.createBitmap(src, 0, 0, src.getWidth(), src.getHeight(), matrix, true); } public static Bitmap scaleWithXY(Bitmap src, float scaleXY) { return scaleWithXY(src, scaleXY, scaleXY); } }