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

[feature request] Rotate the JPEG using EXIF header (no runtime cost) #241

Open
josuah opened this issue Jul 28, 2024 · 1 comment
Open

Comments

@josuah
Copy link
Member

josuah commented Jul 28, 2024

Rotating a JPEG image in hardware is expensive: it requires a buffer of the full frame so that it can be transposed...

For this reason, JPEG EXIF metadata were added to encode the orientation of the image without actually performing the transformation.

http://sylvana.net/jpegcrop/exif_orientation.html

This means a small metadata change would allow the image to be displayed in the expected orientation by preview program or other software.

@OkGoDoIt
Copy link

OkGoDoIt commented Jan 7, 2025

I implemented this in the python SDK but I couldn’t make it work in flutter due to not being able to find an EXIF manipulation library that worked properly for this, or at least that I could figure out how to make work properly. EXIF data headers are surprisingly esoteric. Perhaps someone who has more experience with EXIF can come up with a way to do it properly without having to rely on third-party libraries?

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

No branches or pull requests

2 participants