copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?

Started by malenki, October 27, 2011, 02:47:57 PM

Previous topic - Next topic

malenki

In a bug report at wikimedia it was pointed out that exiftool seems to write the mentioned field incorrect:
https://bugzilla.wikimedia.org/show_bug.cgi?id=31944

The difference should show up between this files:
http://upload.wikimedia.org/wikipedia/commons/archive/5/5d/20111025203210!Museum_in_Frashër%2C_Albania.png
(Metadata copied from a jpg to the png with -tagsFromFile)
and this file:
http://upload.wikimedia.org/wikipedia/commons/5/5d/Museum_in_Frashër%2C_Albania.png
(metadata like the file above but field "Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)" removed)

PS: for coping tags from the jpg to png I used exiftool 8.6 on aptosid.

Phil Harvey

Thanks for this bug report.  This is definitely an ExifTool bug.   I'll fix this.

Funny that it went unnoticed for so long. :(

- 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 ($).

malenki

Thank you for the fast reply and confirmation.

Quote from: Phil Harvey on October 27, 2011, 03:08:34 PM
Funny that it went unnoticed for so long. :(

How long did it exist?
To me it looks like a very minor glitch which can get discovered only by accident.

Phil Harvey

This glitch has existed since the first version of ExifTool that could write XMP.

Very embarrassing, because ExifTool is one of the most mature XMP writers available.  Bugs like this are common in other applications, but not Exiftool.

- 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 ($).

Phil Harvey

To make this thread self-contained, I will include a description of the exact problem as mentioned in the bugzilla report.

The problem is that ExifTool 8.68 and earlier writes XMP-tiff:YCbCrSubSampling as a string:

  <tiff:YCbCrSubSampling>2 1</tiff:YCbCrSubSampling>

instead of a list, as it should:

  <tiff:YCbCrSubSampling>
   <rdf:Seq>
    <rdf:li>2</rdf:li>
    <rdf:li>1</rdf:li>
   </rdf:Seq>
  </tiff:YCbCrSubSampling>


This bug will be fixed in ExifTool 8.69.

- 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 ($).