I need to crop the image in irregular shape, my application, i.e. I select the part with my finger, and if I press the crop button, the selected part by itself in the image will be saved in the SDCard.
How to do it?
You need to define a Path for the shape you want to cut.Then create a rectangle around it, set everything between your shape to a rectangle in transparent (alpha channel)
This source should give you some tips:https://github.com/lvillani/android-cropimage/blob/develop/src/com/android/camera/CropImage.javaTake a look at the onSaveClicked method, line 209
Refer to this project: https://github.com/coderush/FlexiCrop
It has a code for cropping irregular shapes.