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

Fix rotation on Android, using EXIF data #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

klinker24
Copy link

Some Android phones have their camera sensors mounted sideways, upside down, ect. The BitmapFactory#decodeFile method does not take this into account, by default. So, when the file is decoded, it could end up getting shown in an incorrect orientation on the canvas.

iOS manages this correctly already. This PR just fixes the issue for Android devices.

@jahorwitz
Copy link

This could be the cause to the issue I was seeing here: #149 (comment)

Thank you for this 👍

maheshwaripurvesh added a commit to maheshwaripurvesh/react-native-sketch-canvas that referenced this pull request Sep 19, 2022
Some Android phones have their camera sensors mounted sideways, upside down, ect. The BitmapFactory#decodeFile method does not take this into account, by default. So, when the file is decoded, it could end up getting shown in an incorrect orientation on the canvas.

iOS manages this correctly already. This PR just fixes the issue for Android devices.

Please refer original commit to root repo terrylinla#135
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants