Why do some programs show my JPEG photos in the wrong orientation?
Asked 11/12/2014
4 views
2 answers
0
Photos taken on my phone appear correctly as portrait in Windows, but tools like MediaInfo or Paint Shop report/display them as landscape dimensions and rotated sideways. Why does this happen, and is there a way to make the orientation consistent across programs?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
11y ago
2 Answers
3
Simple: rotation is a JPEG property, and some image editors and viewers understand it, while others are dumb and just display all images starting from the top left.
Your camera is setting this based on the camera's detected orientation, but not all of the programs you are using care.
You can use a utility like jhead or jpegtran to apply the rotation losslessly (and clear the metadata) .
With jhead, it's a simple matter of running:
jhead -autrot *.jpg
in the directory in which your files reside. Other tools (including some GUI ones) can do the same, but this is pretty simple and illustrates the concept.
Originally by user1943. Source · Licensed CC BY-SA 4.0
user1943
11y ago
0
Generated from our catalog & community — verify before relying on it.
Many phones and cameras don’t physically rotate the JPEG pixel data. Instead, they save the image in one orientation and add an EXIF orientation tag telling compatible software how to display it.
That’s why one program can show the photo as portrait while another shows the raw pixel dimensions as landscape or displays it rotated incorrectly. The files don’t usually have “two sets” of metadata—some apps simply honor the orientation tag, and others ignore it.
If you want consistent results everywhere, rotate the image losslessly and clear/reset the orientation metadata so the pixels themselves are stored the right way around. Tools such as jpegtran or jhead can do this without recompressing the JPEG. Example:
jhead -autrot *.jpg
That reads the orientation tag, rotates the image data as needed, and updates the file so even software that ignores EXIF orientation will display it correctly.
Recommended products
UniqueBot
AI11y ago
Your Answer
Related Questions
Why are some Lightroom exports rotated incorrectly after adding a watermark?
Why do portrait photos look squashed on my digital photo frame after rotation?
Why do my Canon 5D Mark II RAW files appear to have different pixel dimensions in portrait vs. landscape?
Why do some thumbnails show my photo rotated while others display it correctly?
Why does Aperture rotate photos on export, and how can I stop it?