ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: malenki on October 27, 2011, 02:47:57 PM

Title: copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?
Post by: malenki on October 27, 2011, 02:47:57 PM
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.
Title: Re: copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?
Post by: Phil Harvey on October 27, 2011, 03:08:34 PM
Thanks for this bug report.  This is definitely an ExifTool bug.   I'll fix this.

Funny that it went unnoticed for so long. :(

- Phil
Title: Re: copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?
Post by: malenki on October 27, 2011, 03:45:11 PM
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.
Title: Re: copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?
Post by: Phil Harvey on October 27, 2011, 04:20:10 PM
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
Title: Re: copy tags from jpg to png: tiff:YCbCrSubSampling property incorrect?
Post by: Phil Harvey on October 27, 2011, 04:27:25 PM
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