Yalantis / uCrop

Image Cropping Library for Android
https://yalantis.com/blog/introducing-ucrop-our-own-image-cropping-library-for-android/
11.89k stars 2.16k forks source link

Radius of the Round mask #154

Closed tomlobato closed 8 years ago

tomlobato commented 8 years ago

Hello! Great lib. Saved my week :) I`m using setOvalDimmedLayer(true). Is there a way to set the radius of the layer?

shliama commented 8 years ago

@tomlobato Hello and thanks for using uCrop :)

Well, there are no such feature atm. But you can override ucrop_view.xml layout and define your own paddings/size for the OverlayView.

sench93 commented 8 years ago

setOvalDimmedLayer(true). After giving this options it is cropping square(rectangle) image not oval. Can you help ?

shliama commented 8 years ago

uCrop does not crop oval/circle out of bitmap, because it is useless. If you need to show it like avatar afterwards - use Fresco lib or some Picasso Circle transformation.

setOvalDimmedLayer() method is just to show user how it will look like after image is cropped.