wp.jochen.hayek.name/blog-en

digital cameras, the Orientation tag, pictures not standing upright

Modern cameras (some mobile phone cameras included) sense, what is up and what is down, if you take a picture. And if the software on your computer likes interpreting the “EXIF Orientation” flag of the picture, you will never notice, something unusual is going on. Some software doesn’t though, so sometimes you are tempted to turn your picture long enough, until it does stand upright. But that kind of software also doesn’t properly keep the Orientation flag in sync, so next time you browse you pictures with modern software, the pictures look no longer standing upright with that software.

Now today I thought of a simple trick, but I wasn’t sure beforehand, whether it would work – and it did work.
Let me explain the idea! Let’s suppose you watch your picture in modern software! If you turn your picture once to the left, and once to the right, that looks like it should not have any effect, but afterwards the Orientation tag is set to “Horizontal (normal)“, and internally the picture is also represented “upright“.
Why is that?
Well, when the software 1st picks up the picture with a value different to “Horizontal (normal)“, it turns the picture, so that it looks upright to you. But I assume, you wouldn’t like it, if that operation would cause the picture file to change on your disk, right?!?
But if you turn the picture to the left, that is an operation, that you would allow to have an effect to the picture file, right?!? And if you turn the picture to the right, that annuls the visual effect in your eyes.
If your software is rather smart, it only keeps track of the orientation changed and updates the EXIF Orientation tag. That wouldn’t help us.
If your software isn’t overly smart but just smart enough for us, it will leave the picture and the picture file in a state, so that the picture’s internal representation is upright and the EXIF Orientation tag is set to “Horizontal (normal)“, and everything is fine. Now pretty much every software will show the picture properly regardless of the EXIF Orientation tag.
Neat trick, isn’t it? Works for me on Mac OS X with the Previewer.
That software requires me to confirm, that I want the changed files saved to disk. Other software may have done that already without asking you.
Exit mobile version