-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cropped image is different from the cropping window #22
Comments
I did not meet this problem yet. Please provide more informations like platform, version, a reproducible demo. |
Environmentreact-native-cli: 2.0.1 DescriptionCropped Image is different from what is seen in the cropping window Code SnippetAs you can see it automatically cropped the image from the first part even though I didn't even move the cropping window. |
Yes I am also facing the same issue @ggunti |
Hit this bug yesterday on an Android 9 device. "react-native": "^0.61.5" But, I've also updated the I have a hunch that it may be related to the image orientation. |
@AGIsmail Thanks for the information. |
Hey @enthussb For the former, this should be sufficient. |
@AGIsmail Okay, thanks! |
So, as I understand, the |
I haven't looked into it too deeply but I do know that react-native-image-crop-picker implements image rotation using the uCrop library.
Perhaps the better idea is for us to fix EDIT: Did you trace the cause of the cropping image issue to |
This happens because images taken by phones always have Landscape dimensions, even if taken in Portrait mode. In other words, the width will always be greater than the height, yet for portrait it should be the opposite. Usually this isn't a problem because most image viewers respect the image's metadata, which specifies orientation (More info). Solution: Swap width and height and erase the metadata. Example:
To determine if it was taken in Portrait mode, check EXIF in metadata. There are libraries for it. |
You can try this:
|
@ggunti solution found? |
For cropping is used |
It should be fixed in v0.2.3. Please do not forget to revisit the installation steps (README file) because an another dependency was added: |
Sometimes the image is cropped correctly and sometimes not. I noticed it happens largely when the file size is greater than 1MB.
The text was updated successfully, but these errors were encountered: