Java tutorial
//package com.java2s; //License from project: Apache License import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap resizeBitmap(Bitmap bitmap, float sx, float sy) { Bitmap newBitmap; Matrix matrix = new Matrix(); matrix.postScale(sx, sy); newBitmap = Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, false); return newBitmap; } }