[conspire] image rotation/display ... technology ... ugh (& EXIF - or when it goes wrong)
Michael Paoli
Michael.Paoli at cal.berkeley.edu
Sat Dec 12 14:08:50 PST 2020
Ugh. Sometimes technology mostly gets in the way.
So, small handful of image files, no problem, I know I want to rotate
some of 'em, also make some smaller versions, ... no biggie.
Have a look over 'em with ImageMagick's display ... okay, one to rotate,
the rest fine, do the smaller version too, no biggie, ... done - or
so I thought.
Then I look at 'em in web browsers ... orientations all messed up,
apparently almost randomly. Crud. I must'a specified something wrong(?).
Repeat the process ... all looks fine using display,
then web browsers, ... crud, looks like same again - maybe the
browser is being "too smart", rotating based on aspect ratio or something
like that? I dunno, try another browser ... same ...
try browsers with file: URLs instead of https or http ... same,
what the heck.
So, I decide to fire up GIMP to have a peek - at this point I'm not even sure
what the heck the orientations on the images are, as I'm also seeing this on
the original images. Anyway, GIMP launched on one of the originals, and
it quite helpfully tells me:
<displays unrotated thumbnail, and under it: "Original">
<also displays rotated thumbnail, and under it: "Rotated">
"This image contains EXIF orientation metadata.
Would you like to rotate the image"
[ ] Don't ask me again
[Keep Original] [Rotate]"
Ah ha!
The camera was pointed about straight down when the pictures were taken.
And the camera was "smart enough" <cough, cough>, to then decide,
probably on the camera's orientation, and not at all the image data (at
least apparently), how the images ought be rotated when displayed,
and so noted in the EXIF orientation metadata,
to correct for the camera's orientation. Ugh. Probably not so
useful when the camera acceleration on the camera is approximately
along the axis of the camera's lens, rather than more typical gravitational
acceleration directions relative to the camera. Likely also quite
annoying, oh, on the ISS, and other low G environments. Or
maybe it "decided" that based on GPS or the like. Relatively
annoying in any case - especially when it gets it quite decidedly
wrong.
Time to alter and/or strip some EXIF data.
More information about the conspire
mailing list