r101802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101801‎ | r101802 | r101803 >
Date:13:10, 3 November 2011
Author:bawolff
Status:ok (Comments)
Tags:
Comment:
(bug 31944). As a work around for bug 31944, don't extract tiff:YCbCrSubSampling from XMP.

Several files have wrong type for that property, XMPReader currently marks entire file as invalid instead of just specific property, if there is a type mismatch in XMP data.
Modified paths:
  • /trunk/phase3/includes/media/XMPInfo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/media/XMPInfo.php
@@ -631,12 +631,23 @@
632632 'validate' => 'validateClosed',
633633 'choices' => array( '1' => true, '2' => true ),
634634 ),
635 - 'YCbCrSubSampling' => array(
636 - 'map_group' => 'exif',
637 - 'mode' => XMPReader::MODE_SEQ,
638 - 'validate' => 'validateClosed',
639 - 'choices' => array( '1' => true, '2' => true ),
640 - ),
 635+ /********
 636+ * Disable extracting this property (bug 31944)
 637+ * Several files have a string instead of a Seq
 638+ * for this property. XMPReader doesn't handle
 639+ * mismatched types very gracefully (it marks
 640+ * the entire file as invalid, instead of just
 641+ * the relavent prop). Since this prop
 642+ * doesn't communicate all that useful information
 643+ * just disable this prop for now, until such
 644+ * XMPReader is more graceful (bug 32172)
 645+ * 'YCbCrSubSampling' => array(
 646+ * 'map_group' => 'exif',
 647+ * 'mode' => XMPReader::MODE_SEQ,
 648+ * 'validate' => 'validateClosed',
 649+ * 'choices' => array( '1' => true, '2' => true ),
 650+ * ),
 651+ */
641652 ),
642653 'http://ns.adobe.com/exif/1.0/aux/' => array(
643654 'Lens' => array(

Follow-up revisions

RevisionCommit summaryAuthorDate
r1025981.18wmf1 MFT r101445, r101464, r101666, r101802, r101860, r101990, r102297, r...reedy23:20, 9 November 2011

Comments

#Comment by Hashar (talk | contribs)   14:46, 3 November 2011

That sound like a workaround for an upstream bug isn't it?

Do we really need that to be back ported in 1.18?

#Comment by Bawolff (talk | contribs)   16:35, 3 November 2011

Its not critical by any means, but even with the upstream bug in exiftool fixed, we'll be dealing with older files essentially forever.

Status & tagging log