Support circle crop as an aspect ratio option#747
Support circle crop as an aspect ratio option#747carstenz wants to merge 1 commit intoYalantis:master-non-nativefrom
Conversation
|
@carstenz , thank you for the PR. Your idea seems to be promising. However, could you please provide some details about how do you see this API to be integrated and used? As I can see it doesn't work out of the box. Please add some details about this feature usage sample. Thank you. |
Hi! That's it really. Perhaps calling
When it comes to the output (EXTRA_OUTPUT_CIRCLE_CROP), it's really up to the user of the feature how to use that flag. In my company, we store this flag as part of image metadata, and apply a circle mask to images that has it. |
This allows you to add circle crop as one of the aspect ratio options.
When circle crop is selected/unselected, a protected function on UCropActivity/UCropFragment is called (setCircleCrop) - this allows a subclass to update the crop grid/frame/dimmed layer if so desired. This is also why I've changed some views to be protected rather than private, most importantly mOverlayView.