Skip to content
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

[Android] width and height returned by onImageCrop are swapped for EXIF-rotated pictures. #4

Open
Mouwrice opened this issue Jul 22, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@Mouwrice
Copy link

The width and height parameters passed to onImageCrop are the inverse of the actual image dimensions for the image located at parameter uri.

This only happens for EXIF-rotated pictures, (e.g. Orientation: 6). The Canhub library properly resets the Orientation value to 0 and updates ImageWidth and ImageHeight in the EXIF headers, but by using the dimensions of cropRect here, the returned width and height are wrong.

This breaks some stuff on my side, since I'm relying on those 2 parameters to do some extra processing.

PS: Any way to preserve EXIF aside from Orientation? All the other metadata in there are stripped as well, unfortunately.

Originally posted in hhunaid#66

@Mouwrice Mouwrice added the bug Something isn't working label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant