ArthurHub / Android-Image-Cropper

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

Original image saved in gallery when launching Crop activity #867

Open kumulonimbus91 opened 2 years ago

kumulonimbus91 commented 2 years ago

I am experiencing one weird thing while using ArthurHub/Android-Image-Cropper, everything works fine, the image is sent to crop activity and cropped image is retrieved to ImageView. However, when I press crop button to launch Crop Activity the original image is saved in the gallery by itself. Please help.

Here is the code:

mBinding.btnCrop.setOnClickListener { filteredBM.value?.let {

        val uri = getImageUri(this, it)
        imageUri = uri

     CropImage.activity(imageUri)
         .start(this)

    }

} 

So the image is already in the image view when launching crop activity. In onActivityResult I put the cropped image into that image view and everything works fine except for that original image being saved in the gallery.

Canato commented 2 years ago

please read https://github.com/ArthurHub/Android-Image-Cropper/issues/858