jp2a icon indicating copy to clipboard operation
jp2a copied to clipboard

Phone portrait mode photos are rotated by 90°

Open gregorni opened this issue 2 years ago • 7 comments

When converting images shot on a smartphone in portrait mode, the output is rotated anti-clockwise by 90°. This might have to do with the image metadata not being read properly, or at least not the part that tells that the image is rotated 90°.

gregorni avatar May 12 '23 16:05 gregorni

Would you be able to share an image where this happens for debugging? I was not able to reproduce this issue with my smartphone. Different software on different smartphones might rotate images using different techniques.

Talinx avatar May 12 '23 16:05 Talinx

I found the issue on these two photos:

Screenshots

2023-02-05-15-59-45-806

IMG_20230512_180318

gregorni avatar May 12 '23 16:05 gregorni

If it helps, ascii-image-converter has the same problem.

gregorni avatar May 12 '23 16:05 gregorni

I've talked about this with more people, and it seems to be a problem the image library used to open the image should take care of.

What library is jp2a using?

gregorni avatar Jun 28 '23 07:06 gregorni

jp2a uses libjpeg. However most people will have the optimized version libjpeg-turbo installed.

Talinx avatar Jun 28 '23 09:06 Talinx

So the libjpeg-turbo devs rejected my issue. I guess someone will have to do a manual check for EXIF rotation tags, either jp2a or the frontend.

gregorni avatar Jun 28 '23 19:06 gregorni

Added support for Exif orientation using libexif, new release coming soon (or build from the develop branch right now).

Talinx avatar Sep 04 '24 16:09 Talinx