Photography Asked on December 14, 2020
Since more then ten years I use exiftran
to rotate images after getting them from the camera.
Is this step still needed today?
Don’t browsers and other image apps rotate the image correctly without running exiftran on the files.
Background on exiftran (from the exiftran man
page):
exiftran is a command line utility to transform digital image
jpeg images. It can do lossless rotations like jpegtran, but unlike
jpegtran it cares about the EXIF data: It can rotate images
automatically by checking the exif orientation tag, it updates the
exif information if needed (image dimension, orientation), it also
rotates the exif thumbnail. It can process multiple images at once.
Since more then ten years I use
exiftran
to rotate images after getting them from the camera. Is this step still needed today?
Yes.
Don't browsers and other image apps rotate the image correctly without running
exiftran
on the files.
No.
As stated by @junkyardsparkle:
I personally still experience occasional pain from discovering that the actual orientation of an image wasn't what it appeared to be, so I try to eliminate the discrepancy in my files as much as possible.
And noted by @AK:
There can be errors (e.g. the camera doesn't record the correct orientation on a particular shot.)
Also, often, images can become separated from their Exif data. Or images can be saved rotated, but the Exif not updated. Or multiple programs may treat the rotation flag differently resulting in different orientations being displayed.
The best way to minimize surprises and maximize interoperability is to use exiftran
to rotate the images. It can be scripted to auto-rotate all files at import.
Correct answer by xiota on December 14, 2020
UPDATE: It looks like you don’t need anymore to physically rotate your pictures with Firefox/Opera/Chromium in Linux. For instance it did not work with Chromium Version 73.0 but it does with Chromium Version 83.0. I have reconsidered the scripts I use to put my pictures online and found that the reason why it didn’t work was a call to ImageMagick’s "mogrify -auto-orient" which I used to resize the original image for web usage. Now I call mogrify without this option and I have no problem in recent browsers, as long as the orientation provided by you camera is OK of course, which is usually the case. So normally you don’t need exiftran nor jpegtran nor exifautotran anymore. Period.
OBSOLETE: AFAIK image rotation is still needed in 2020 in browsers but jpegtran does the job quite as well as exiftran. jpegtran keeps all tags as long as the "-copy all" option is used, which is not brand new: it has been possible since version 6b of libjpeg, released 27 March 1998. If you always require tag/marker conservation, you can use an alias:
alias jpegtran='jpegtran -copy all'
You can also keep comments only using "jpegtran -copy comments". In place editing is not supported with jpegtran but of course this is a no-brainer as well. You can also use exifautotran which performs the automatic adjustment.
So IMHO you just don’t need to install exiftran, which is a separate program, and just use jpegtran, which is bundled with libjpeg.
P.S. It is not nice to spread misinformation to deprecate the competitors ;-)
Answered by Alexandre Oberlin on December 14, 2020
Not all of my cameras are happy with pictures rotated on the computer and refuse to display them at all or at least using the same way of displaying them that they'd do when presented with a changed rotation flag. So at least on the memory cards, any manipulation of rotation has to be done in-camera for best results, and that only affects the rotation flag rather than the data.
If viewing programs could be taught to do rotation for memory cards from a particular camera in a particular way (and for some cameras, only by meddling with the rotation flags), fixing rotation on the memory cards could be done on the computer rather than on the camera.
Most software I work with, in contrast, has no problems properly interpreting the rotation flags. So my take on using exiftran
these days is that its use is downright detrimental, at least on the original media. Admittedly my cameras tend to be a lot older than the software on my computer: that may play into it.
Answered by user95069 on December 14, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP