IMatch 2017.5.6 - Orientation flips back to horizontal after writeback

Started by lnh, May 31, 2017, 07:01:44 AM

Previous topic - Next topic

lnh

I'm not sure if this is a bug, or if I'm doing something wrong:

Inputting some old photos from a camera which didn't have an orientation sensor so everything is input in horizontal orientation. Most are JPGs but there are also RAF RAW files. If I change the orientation using the Commands/Image/Orientation (EXIF)/Rotate 270° CW command, everything looks good for the JPGs both in the internal viewer and external file viewers. If I then assign some hierarchical keywords and write back metadata, the orientation of those files flip back to horizontal.

Is there some possible setting or existing metadata in these files which causes this behavior? The files are not versioned, nor do they have buddy files. The only other thing I've done with these files is geo-locate, reverse geocode and create categories from the geocode.

Mario

The EXIF orientation is synchronized between XMP and EXIF metadata.
When you look at the file in the Metadata Panel, Browser mode, do both EXIF and XMP/EXIF show the same orientation value?
During write-back, IMatch synchronizes XMP -> EXIF and hence if the two values are different, XMP wins.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

lnh

Grabbed a virgin file which has never seen IMatch before and did this test:

1) Imported into IMatch

2) Ran ECP (List Metadata) and found:
[IFD0]          Orientation                     : Horizontal (normal)
[IFD1]          Orientation                     : Horizontal (normal)

3) Commands/Image/Orientation (EXIF)/Rotate 270° CW
Displays in portrait orientation inside IMatch thumbnail, Viewer and external viewers.

4) Ran ECP (List Metadata) and found:
[IFD0]          Orientation                     : Rotate 270 CW
[IFD1]          Orientation                     : Horizontal (normal)
[XMP-tiff]      Orientation                     : Rotate 270 CW

5) Assign keyword and write back metadata

6) Ran ECP (List Metadata) and found:
[IFD0]          Orientation                     : Horizontal (normal)
[IFD1]          Orientation                     : Horizontal (normal)
[XMP-tiff]      Orientation                     : Horizontal (normal)

As expected, it reverts back to the original horizontal orientation.

So it seems like the IFD1 tag must be the problem. Is there a way to force IFD1 to update automatically when using the EXIF rotate command?

Mario

I didn't even know that is is possible to hold both an EXIF orientation in IFD0 and IFD1. Which devices created this image?
Please send a sample to my support email. Probably I need to force ExifTool to also write IFD1 orientation when IMatch updates the metadata after changing the EXIF orientation

But this command is available unchanged since IMatch 5.0 (2014) and hence I believe that this duplication of values or even a dupe record is particular to this specific file variant.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

lnh

The files are from a Fujifilm FinePix S2 Pro.

I though possibly that ID Imager Pro or Photo Supreme had touched the file at some point in the past, but searched out a very old archive of "untouched" files and found they contain IFD0 and IFD1 entries when viewed with ExifToolGUI.

Is there a simple way to just eliminate the redundant information in ECP? I'm guessing that wouldn't be the best long-term solution but it might get me over this stumbling block.

I will send a file and reference this entry.

lnh

Would this be a reasonable temporary workaround without unexpected side effects:

1) Rotate 270° CW using IMatch
This will get the thumbnail look right along with the orientation set in IFD0 and XMP-tiff

2) Follow this with the ECP script

-IFD1:Orientation#=8
-overwrite_original_in_place
{File.FullName}

Mario

I have looked into this and I will not make any change.

IMatch does not even "see" that there is an IFD1 orientation tag because the IFD0 orientation tag masks it out (the data ExifTool delivers to IMatch maps both tags to the same group, tag and index). Breaking that up and doing some sort of work-around may not only cause tons of bugs but may cause days of work, support requests, possible damaged metadata. Won't do.

I suggest you fix your files by removing the extraneous IFD1 orientation. I made a quick check here and it seems to work nicely.
The command I used was

-overwrite_original
-a
-ifd1:orientation=
{Files}

This removes the IFD1 entry, but keeps the EXIF, TIFF and XMP orientation tags.
Try it out with some sample files!
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook