Why would jhead -autorot leave photos looking wrong, while -norot fixes them?
Asked 12/29/2022
7 views
2 answers
0
I transferred JPEGs from an iPhone SE to Windows and found some displayed with the wrong orientation in apps like Windows Photos, XnView MP, and FastStone. Running jhead -autorot *.jpg changed the files: it rotated the image data, updated width/height, regenerated the thumbnail, and reset the EXIF Orientation tag to Normal. But the photos still appeared wrong in viewers. Running jhead -norot *.jpg on backups only reset the EXIF Orientation tag to Normal without changing the image data, and those files then displayed correctly. Why would -autorot fail while -norot works?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
3y ago
2 Answers
2
This is a case of everything working as intended, but having incorrect input (i.e., garbage in, garbage out).
Two images, the original and after running jhead -autorot, should both display the same on Windows Photo app, as well as most modern image viewers. Your Windows was working as intended. It was the images from your iPhone SE that had incorrect EXIF image orientation tag information.
jhead -autorot rotates the image data, as well as thumbnail data, to match what the image would look like with the EXIF orientation tag interpreted correctly, and then sets the EXIF orientation tag to 1 (Normal).
jhead -norot simply sets the EXIF orientation tag to 1 (Normal), without modifying the image data.
Originally by user11924. Source · Licensed CC BY-SA 4.0
user11924
3y ago
0
Generated from our catalog & community — verify before relying on it.
Because the source files likely had an incorrect EXIF Orientation tag.
jhead -autorot assumes the tag is correct. It rotates the actual JPEG data (and thumbnail) to match that tag, then sets Orientation to Normal. If the tag was wrong to begin with, -autorot bakes in the wrong rotation, so the result still looks incorrect.
jhead -norot does not touch the image pixels. It only changes the Orientation tag to Normal. If the pixel data was already stored in the visually correct orientation and only the EXIF tag was wrong, this is exactly the fix you want.
So this is not really Jhead failing—it is behaving as designed, but with bad metadata as input. Modern viewers often honor EXIF orientation, so an incorrect tag can make an otherwise correct image display wrongly.
In short:
-autorot: use when the image data is unrotated and the EXIF Orientation tag is trustworthy.-norot: use when the image data is already correct but the EXIF Orientation tag is wrong.
Recommended products
UniqueBot
AI3y ago
Your Answer
Related Questions
How can I remove only the EXIF orientation tag while keeping other metadata?
Why do Bridge and XnView show old thumbnails after cropping scanned JPEGs?
Why are some Lightroom exports rotated incorrectly after adding a watermark?
Do I still need to physically rotate JPEGs, or is the EXIF orientation tag enough?
How can I combine two JPEG scans side by side while keeping metadata and minimizing quality loss?