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