Yalantis / uCrop

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

Cropping using sides in addition to corners #831

Open sajjadroudi opened 2 years ago

sajjadroudi commented 2 years ago

Most of the apps support cropping using sides (red areas marked in below picture) in addition to corners. It will be so great if you add this feature.

photo_2022-04-04_12-17-24

SarithaSai2020 commented 2 years ago

Hi there,

you can use below code to custom crop , cropping with user hand.

UCrop.Options options = new UCrop.Options(); options.setCompressionFormat(Bitmap.CompressFormat.JPEG); options.setCompressionQuality(100); options.setFreeStyleCropEnabled(true); options.setShowCropGrid(true); options.setHideBottomControls(true);

UCrop uCrop = UCrop .of(uri, Uri.fromFile(new File(this.getTmpDir(this), UUID.randomUUID().toString() + ".jpg"))) .withOptions(options);

uCrop.start(this);
Selina592732122 commented 2 years ago

Same question