ArthurHub / Android-Image-Cropper

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

How to save cropped image to activity #750

Open introidx opened 4 years ago

introidx commented 4 years ago

i am trying for two days and unable to save image after crop..please help

reddytocode commented 4 years ago

inside on activity result you have this to receive the image

CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE -> {
                    val uriResult = CropImage.getActivityResult(data).uri
                    savePhoto(uriResult.path!!)
                }

so, you have The URI path and you are able to use this for saving the image wherever you want.

by the way, the image for default is saved inside Android/com./data/cache/...

kibotu commented 4 years ago

You could also simply set output uri directly to your favorite folder

CropImage.activity()
            .setOutputUri(uri)
            .start(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