martes, 28 de febrero de 2012

BlackBerry: Cropping images


public Bitmap cropImage(Bitmap image, int x, int y, int width, int height) {
    Bitmap result = new Bitmap(width, height);
    Graphics g = new Graphics(result);
    g.drawBitmap(0, 0, width, height, image, x, y);
    return result;
}