Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { public static Bitmap scale(Bitmap bitmap, float scale) { if (bitmap == null) { return null; } int width = Math.max(1, (int) (bitmap.getWidth() * scale)); int height = Math.max(1, (int) (bitmap.getHeight() * scale)); return Bitmap.createScaledBitmap(bitmap, width, height, false); } }