Crop image with special border

I am writing an Android application. I need to implement something like the image below (from a tool for choosing LG wallpapers). The original image does not have a circle.

The actual image is cropped to the outer rectangle, but thumbnails are cropped in the inner circle.

I want to implement something like this, but the guide is not a rectangle, but a circle. Are there any examples or libraries for this?

enter image description here

+4
source share
3 answers

: . , ...

https://github.com/MMP-forTour/cropimage

private void cropImage(String imagePath) {
    Intent intent = new Intent(context, CropImage.class);
    Log.d("imagepath", "URI= " + imagePath);
    intent.putExtra("image-path", imagePath);
    intent.putExtra("scale", true);
    intent.putExtra("circleCrop",true);  //for circular crop
    intent.putExtra("return-data", false);
    startActivityForResult(intent,REQUEST_CODE_CROP_IMAGE);
 }

.

https://github.com/biokys/cropimage

https://github.com/lvillani/android-cropimage

https://github.com/dtitov/pickncrop

+1

All Articles