frame-codebase icon indicating copy to clipboard operation
frame-codebase copied to clipboard

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

Open josuah opened this issue 1 year ago • 1 comments

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.

josuah avatar Jul 28 '24 19:07 josuah

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?

OkGoDoIt avatar Jan 07 '25 19:01 OkGoDoIt