BlackBerry - Cropping image

Posted by rupesh on Stack Overflow See other posts from Stack Overflow or by rupesh
Published on 2010-04-21T10:55:59Z Indexed on 2010/04/21 18:53 UTC
Read the original article Hit count: 182

Hi all

i want to crop a part of Image ,for that i am using following code:

    int x=20;
    int y=50;
    int [] rgbdata=new int[(0+width-x+height-y)* (image.getWidth())];
    image.getARGB(rgbdata, 0, image.getWidth(), x, y, width, height);
    cropedImage=new Bitmap(image.getWidth(),image.getWidth());
    cropedImage.setARGB(rgbdata, 0,image.getWidth(), 80,80, width, height);

x an y are the position from where the cropping will be done in the rectangular form. but it is not working can any one help me out please. any sample code will work for me. its urgent. thanks in advance

© Stack Overflow or respective owner

Related posts about blackberry

Related posts about bitmap