Different behaviour of ExifTool on JPEG and TIFF files ?

Started by email@m-moser.de, January 12, 2013, 02:28:06 PM

Previous topic - Next topic

email@m-moser.de

Hi Phil,

why is the same ExifTool command working on a JPEG file, but not on the corresponding TIFF file?


>exiftool -P -a -G1 -keywords -subject -mykeywords -supplementalcategories 2.jpg 2.tif
======== 2.jpg
[IPTC]          Keywords                        : 151 128-6, G, H
[XMP-dc]        Subject                         : 151 128-6, G, H
[Composite]     My Keywords                     : 151 128-6, G, H
[IPTC]          Supplemental Categories         : G, H
[XMP-photoshop] Supplemental Categories         : G, H
======== 2.tif
[IPTC]          Keywords                        : 151 128-6
[XMP-dc]        Subject                         : 151 128-6
[Composite]     My Keywords                     : 151 128-6, G, H
[XMP-photoshop] Supplemental Categories         : G, H
[IPTC]          Supplemental Categories         : G, H
    2 image files read

>exiftool -P -a -G1 -"IPTC:keywords<MyKeywords" -"XMP:Subject<MyKeywords" 2.jpg 2.tif
Warning: No writable tags set from 2.tif
    1 image files updated
    1 image files unchanged

>exiftool -P -a -G1 -keywords -subject -mykeywords -supplementalcategories 2.jpg 2.tif
======== 2.jpg
[IPTC]          Keywords                        : 151 128-6, G, H
[XMP-dc]        Subject                         : 151 128-6, G, H
[Composite]     My Keywords                     : 151 128-6, G, H
[IPTC]          Supplemental Categories         : G, H
[XMP-photoshop] Supplemental Categories         : G, H
======== 2.tif
[IPTC]          Keywords                        : 151 128-6
[XMP-dc]        Subject                         : 151 128-6
[Composite]     My Keywords                     : 151 128-6, G, H
[XMP-photoshop] Supplemental Categories         : G, H
[IPTC]          Supplemental Categories         : G, H
    2 image files read

>


Is this an ExifTool bug?  ... or is this my fault?

(I tried this with other files: -> same result)

Thanks in advance,
Manfred

Phil Harvey

#1
Hi Manfred,

Thanks for reporting this inconsistency.

I ran some tests, and I can reproduce the problem.

The underlying reason for the difference is that the IPTC comes before the XMP in a JPG image, but after the XMP in a TIFF file.  It looks like the user-defined tag isn't working properly for an XMP list when the -struct option is enabled (which it is by default when copying tags), but I don't yet understand exactly why.  I will need a bit of time to come up with a solution, hopefully later today.

- Phil

Edit:  A work-around, until I can figure out a better solution, is to specify --struct when copying.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

OK, I've tracked down the exact source of the problem:

It was a bug in ExifTool!  You win a gold star for finding and reporting this!! :)

Thanks!!!

This bug will be fixed in version 9.14.  It affected only the calculation of Composite tags which are based on XMP list-type tags when the -struct option was used (or implied as when copying tags).

Sorry for any inconvenience that this may have caused.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

email@m-moser.de

Hi Phil,

the workaround  --struct  works fine for my workflow. There is no hurry to release 9.14.

Thanks again for your excellent support.

Manfred