CanHub / Android-Image-Cropper

Image Cropping Library for Android, optimised for Camera / Gallery.
https://canhub.github.io/
Apache License 2.0
1.17k stars 240 forks source link

[Feature Request] Support for Rounded Rectangle Crop Shape #622

Closed tasy5kg closed 3 months ago

tasy5kg commented 3 months ago

Currently, the library supports cropping images into rectangles and ovals, as defined by CropShape.

I kindly request the implementation of cropping into rounded rectangles.

Despite the availability of methods like Canvas.drawRoundRect() in the Android SDK, integrating this functionality into CropImageView would streamline the cropped preview view experience.

Thank you sincerely for considering this feature request, and for providing this user-friendly and robust image cropping library for every Android developer.

vanniktech commented 3 months ago

Isn't rounded rect an oval?

tasy5kg commented 3 months ago

Isn't rounded rect an oval?

I don't think so... maybe I didn't express myself clearly. I want the picture to be cropped into a rectangle with the four corners of the rectangle rounded, like this:

tasy5kg-vIm2dkS73Vo-unsplash_round_rect

vanniktech commented 3 months ago

Ah I would advise against this and do it on your view layer instead and save the pictures always as a rectangle. You're much more flexible with this.

tasy5kg commented 3 months ago

Thank you, I think you have a point and I agree with you. 🙏