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 some android devices #398

Merged
merged 4 commits into from
May 30, 2024
Merged

Conversation

MrLibya
Copy link
Contributor

@MrLibya MrLibya commented Apr 3, 2024

Error

On some android devices the photo is rotated

Solution

This caused by lack of some exif rotation is not read on creating the new bitmap for rotation.

@MrLibya
Copy link
Contributor Author

MrLibya commented Apr 3, 2024

@taboulot

@taboulot
Copy link
Contributor

Hi @MrLibya do you a device example on which it does not work ?

@taboulot
Copy link
Contributor

taboulot commented Apr 30, 2024

@MrLibya

I think I finally understand the problem. I've detailed it in this issue #402.
Unfortunately your PR does not fix the problem (on both iOS & Android) has it does not take into account the flip operation.

With your fix if the image has an exif orientation value = 4 :
image

I think we will have this result:
image

Instead of this one:
image

@MrLibya
Copy link
Contributor Author

MrLibya commented Apr 30, 2024

Sorry for not providing example code I was busy, I'll look into that and see what I can do

@MrLibya
Copy link
Contributor Author

MrLibya commented May 1, 2024

@taboulot I've added handing for mirrored ( flipped ) image exif, I've used those images to test on https://github.com/recurser/exif-orientation-examples

Code test: https://gist.github.com/MrLibya/cabea9cbbb776cc5e77bf1a56df2d8d2

@felansu
Copy link

felansu commented May 12, 2024

i need this!!

@MrLibya
Copy link
Contributor Author

MrLibya commented May 27, 2024

@taboulot anything else needed?

Copy link
Contributor

@taboulot taboulot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add a new bullet point in section Limitation on the README to explain that EXIF orientation code is correctly handl on Android but not yet on iOS with a link to this issue: #402 ?

@taboulot
Copy link
Contributor

@MrLibya

I left 2 comments.
I'm on vacation, and I'm going to stay that way for a while. My response times are therefore variable, but I will remain available for the next few days.

@MrLibya
Copy link
Contributor Author

MrLibya commented May 30, 2024

@taboulot Done ✅

@taboulot
Copy link
Contributor

@MrLibya

Perfect 👌 I will release it in few minutes

@taboulot taboulot merged commit 7bb6b04 into bamlab:master May 30, 2024
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.

None yet

3 participants