0

I want to crop a bitmap in polygon shape drawn above that bitmap. I'm using masking of bitmap to do this. The operation succeeds well, unfortunately the resulted bitmap after masking has a white background in cropped area,as you can see in the image: enter image description here

And my mask that is created runtime by dragging rectangle around image and creating a polygon shape on above the image is as below : enter image description here I want to remove this unwanted white background. Does any one has idea how could I do this. Any clue or help about how can I do is greatly appreciated. Thanks in advance.

Dory
  • 7,462
  • 7
  • 33
  • 55
  • You need to set the background to transparent. – Henry Aug 29 '13 at 05:56
  • hey @Henry thanks for reply,after masking image, i tried to set the white color background to transparent but i turned my bitmap to white background. Here is code : `Canvas remove = new Canvas(maskImg);` `remove.drawColor(0xFFFFFF, PorterDuff.Mode.CLEAR);` here `maskImg` in the masked bitmap image. Could you please guide me where I am going wrong. – Dory Aug 29 '13 at 06:18
  • Not sure, but you can bet with [this](http://stackoverflow.com/a/12637039/739270), just need to mold your code. – Mohammed Azharuddin Shaikh Sep 02 '13 at 07:05
  • @hotveryspicy I have gone through this link and followed this for masking purpose. But my problem is mask is created runtime,and this mask has white background left in surrounding which is left in resulted image after performing masking. I have edited and added masked image also. – Dory Sep 02 '13 at 07:14

0 Answers0