Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { public static Bitmap cutBitmap(Bitmap bitmap, int nwidth, int nHeight) { if (null == bitmap || nwidth > bitmap.getWidth() || nHeight > bitmap.getHeight()) { return null; } Bitmap result = Bitmap.createBitmap(bitmap, 0, 0, nwidth, nHeight); return result; } }