ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.09k stars 1.55k forks source link

Cropped image doesn't correspond to the selected cropping area if zoom was used #1241

Open meteorra opened 4 years ago

meteorra commented 4 years ago

Version

Tell us which versions you are using:

Platform

Tell us to which platform this issue is related

Expected behaviour

Even if the picture was zoomed, the resulting cropped image should correspond to the area, selected for cropping.

Actual behaviour

If the picture was first zoomed, the resulting cropped image doesn't correspond to the area, selected for cropping.

Steps to reproduce

  1. Select a picture

  2. Zoom in & select for cropping an area in the middle (in the middle is required, because moving far from the middle doesn't give such an evident effect)

  3. Crop the image & compare resulting image with area that was selected for cropping (see attached files)

Attachments

Area for cropping: area-for-crop Result res

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective: 👉 https://opencollective.com/react-native-image-crop-picker/donate

iamgerardm commented 4 years ago

I am seeing the same thing although sometimes it does work with zoom. Can't seem to pinpoint a reason.

therealemjy commented 4 years ago

I'm seeing the same thing too. It seems to happen with low-resolution images. If I pick a high-resolution image (for example one of the default ones on iOS) it seems to work fine.

iamgerardm commented 4 years ago

I'm getting mixed results. It definitely happens on high-res images as well. If I play with it enough I can get it to happen and not happen to the same image low or high.

Have been playing around more and confirm I can get this to happen even on the iOS simulator with the default images provided.

MorelSerge commented 4 years ago

Also getting this issue on iOS

danlupascu commented 4 years ago

I am also having this issue on iOS. Sometimes though the image corresponds with the cropped image but more often it doesn't.

ymc-thzi commented 4 years ago

Also getting this issue on iOS

iamgerardm commented 4 years ago

I haven't had much time to play with the code too much aside from a few minutes here and there to no avail but did notice this plugin uses RSKImageCropper. That plugin is an iOS framework that is very well maintained. Theres a few bugs that were fixed and closed that were related to similar but not the exact issues we are seeing. Has anyone tried forking this and updating with the latest RSKImageCropper framework?

https://github.com/ruslanskorb/RSKImageCropper

bradyim commented 4 years ago

I find that the issue is gone when specifying a not too big "width" and "height".

MorelSerge commented 4 years ago

@bradyim Thanks for the suggestion, but it does not mitigate the issue, unfortunately.

jbromberg commented 4 years ago

Still having this issue. Any updates?

weiningtry7 commented 3 years ago

v0.35.1 fix this, I find TOCropViewController replace RSKImageCropper, nice!

MorelSerge commented 3 years ago

Can this be closed now that RSKImageCropper was replaced with TOCropViewController?