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
correctly handle orientation on android #2058
correctly handle orientation on android #2058
Conversation
@Johan-dutoit I don't know who is actively working on this project, so I may have tagged the wrong person, but can you please merge this pull request? |
We need this change immediately! |
Guys I urgently need this pull request to be merged, still today in many devices if you take a vertical photo width and height are reversed. Could any of the project admins please respond? @Johan-dutoit |
@ulpcan this is how i solved it: Imports:
launchCamera:
|
@GiovanniVisentiniCasavo, thank you very much for the patch. Worked for me with the patch-package. |
thanks @xaiamov |
Hi, if this genuinely solves an issue, I'll happily merge it. If you can resolve conflicts, I'll run it on the test app and take it from there. |
c8061b3
to
10b09e3
Compare
@Johan-dutoit rebase done! |
@Johan-dutoit can you merge it? |
## [7.0.2](v7.0.1...v7.0.2) (2023-10-23) ### Bug Fixes * correctly handle orientation on android ([#2058](#2058)) ([13cdc7c](13cdc7c))
🎉 This PR is included in version 7.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
…ve-image-picker#2058) 2 orientations were NOT handled on Android: - ORIENTATION_TRANSPOSE (5) - ORIENTATION_TRANSVERSE (7) * Added checks for the missing orientations before swapping dimensions
Thanks for submitting a PR! Please read these instructions carefully:
main
branch, NOT a "stable" branch.Motivation (required)
the width / height returned by the library is swapped if the image is on portrait mode on some device (tested with Sony zx1 compact, and see also in some samsung device)
this because the library do not look on the image orientation when computing the w/h this is a problem also if the set the maxHight/Width since you are currently compare maxWidth with height and maxHeight with width
fix #1901 #1689
Test Plan (required)
run the example app, take the photo on portrait, check that the height > width
take a photo on landscape and check that width > height