1

I have my view converted to bitmap image, and I want to cut part from bottom and top. My problem is that I can do one of them, but when I want to do another, it annuls previous work. Here is my code:

bitImage=getBitmapFromView(_root);
                    BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();
                    bitmapOptions.inTargetDensity = 1;
                    bitImage.setDensity(Bitmap.DENSITY_NONE);
                    Bitmap crop=Bitmap.createBitmap(bitImage,0,0,bitImage.getWidth(),((int)(bitImage.getHeight()*0.8)));
                    crop=Bitmap.createBitmap(anything here will annul previous line);
                    crop.compress(Bitmap.CompressFormat.PNG,100,out); 

And here is the picture, so you can better see what I want to cut (arrows show those parts). Thank you.

picture

itsmysterybox
  • 2,748
  • 3
  • 21
  • 26

0 Answers0