ArthurHub / Android-Image-Cropper

Image Cropping Library for Android, optimized for Camera / Gallery.
Apache License 2.0
6.39k stars 1.37k forks source link

Is it possible to change the shape of the guideline? #792

Closed soonmyeong2 closed 3 years ago

soonmyeong2 commented 4 years ago

image image

I want to add a circular shape to the square as shown in the example picture. The result should be the same as Rectangle Crop. I just want to add a circular guide.

Is that possible?

rahat14 commented 4 years ago

use this CropImage.activity() .setGuidelines(CropImageView.Guidelines.ON) .setAspectRatio(1, 1) .setCropShape(CropImageView.CropShape.OVAL) //shaping the image .start(ProfileActivity.this);

soonmyeong2 commented 3 years ago

It is one of the good alternatives. But I want a circle inside a rectangle. Non-square

use this CropImage.activity() .setGuidelines(CropImageView.Guidelines.ON) .setAspectRatio(1, 1) .setCropShape(CropImageView.CropShape.OVAL) //shaping the image .start(ProfileActivity.this);

Canato commented 3 years ago

Hey!

I start a new project to handover this library https://github.com/CanHub/Android-Image-Cropper

The ideia is that we keep improving because this project don’t have updates since 2018 Hope I can count with your help.

Open to contribute, next pieces of work will be Android 11 permissions, refactor into Kotlin and ActivityContract

soonmyeong2 commented 3 years ago

I achieved my goal by modifying the CropOverlayView.java file. Thank you all.