ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: questioner on September 08, 2021, 07:48:00 AM

Title: Question to the different Orientation-tags in "IFD0" and "IFD1"
Post by: questioner on September 08, 2021, 07:48:00 AM
Hi everybody!

I am having some questions concerning the Orientation-tags in a .jpg-file which is attached. In this file, the orientation under "IFD0" is "Horizontal - normal" and under "IFD1" it is "Rotate 180"

1) If I run "exiftool", it only shows the Orientatio- tag of "IFD0". The tag under "IFD1" is not shown. If I now open the GUI of Bogdan, it shows both entries. Why?

2) How comes that it is possible to have two opposing Orientation-tags in one single file? Is this normal?

3) Windows Explorer and also IrfanView Thumbnails both show the Thumbnail in the correct orientation (Horizontal - normal). So it seems as if the orientation under "IFD1" is ignored anyways. If so: Why is it there?

I would be so glad if someone could answer this to help me understand :-)

Greetings!
Title: Re: Question to the different Orientation-tags in "IFD0" and "IFD1"
Post by: StarGeek on September 08, 2021, 12:31:30 PM
Quote from: questioner on September 08, 2021, 07:48:00 AM
1) If I run "exiftool", it only shows the Orientatio- tag of "IFD0". The tag under "IFD1" is not shown. If I now open the GUI of Bogdan, it shows both entries. Why?

This is FAQ #3 (https://exiftool.org/faq.html#Q3).  You need to include the -a (-duplicates) option (https://exiftool.org/exiftool_pod.html#a---a--duplicates---duplicates) so you can see duplicated tags and -G (-groupNames) option (https://exiftool.org/exiftool_pod.html#G-NUM-:NUM...--groupNames) to see the actual locations.

Quote2) How comes that it is possible to have two opposing Orientation-tags in one single file? Is this normal?

It's not normal, but it's not uncommon.  Orientation is supposed to be in the IFD0 directory of the EXIF block, but some programs and camera makers don't follow the EXIF spec properly and will write data to the wrong location.

Quote3) Windows Explorer and also IrfanView Thumbnails both show the Thumbnail in the correct orientation (Horizontal - normal). So it seems as if the orientation under "IFD1" is ignored anyways. If so: Why is it there?

Because some programmer was an idiot who can't read the EXIF documentation ;)

The orientation in the incorrect spot can be safely ignored for the most part.  Exiftool is about the only program that will be able to read it.  If you want to remove it, the group has to be explicitly stated because it's in a non-standard location
exiftool -IFD1:Orientation= /path/to/files/