Dhaval2404 / ImagePicker

📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Apache License 2.0
1.53k stars 341 forks source link

How to get crop position and original image? #335

Open lts0429 opened 11 months ago

lts0429 commented 11 months ago

I'm using the image picker as follows:

ImagePicker.with(this)
    .galleryOnly()
    .crop(1f,1.73f)
    .start()
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    if (resultCode == RESULT_OK) {
        imageView.setImageURI(data?.data)
    }
}

However, I also need the uncropped image and also the cropping location for later use. How do I achieve that?