Here you can find the source of scaleBitmap(Bitmap bitmap, float scale)
public static Bitmap scaleBitmap(Bitmap bitmap, float scale)
//package com.java2s; import android.graphics.Bitmap; import android.graphics.Matrix; public class Main { public static Bitmap scaleBitmap(Bitmap bitmap, float scale) { int width = bitmap.getWidth(); int height = bitmap.getHeight(); Matrix matrix = new Matrix(); matrix.postScale(scale, scale);/* ww w . j av a2s . c om*/ Bitmap newBitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height, matrix, true); return newBitmap; } }