Java tutorial
//package com.java2s; import android.graphics.Bitmap; public class Main { private static Bitmap createClippedBitmap(Bitmap bitmap, int x, int y, int width, int height) { if (bitmap == null) { return null; } Bitmap newBitmap = Bitmap.createBitmap(bitmap, x, y, width, height); return newBitmap; } }