jenkins-bot has submitted this change and it was merged. Change subject: Support all values for exif PhotometricInterpretation ......................................................................
Support all values for exif PhotometricInterpretation I just happened to notice that it wasn't displaying properly on File:Great_falls_of_the_potomac_river_washington_dc.tif . The original implementation only used values found in JPEG images, extend it to all allowed values in tiff files. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html for what the values mean Change-Id: I31b78d093668cec076b7f3599acee528229737f6 --- M includes/media/FormatMetadata.php M languages/i18n/en.json M languages/i18n/qqq.json 3 files changed, 33 insertions(+), 2 deletions(-) Approvals: Gergő Tisza: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 25f4806..73eeba6 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -190,8 +190,18 @@ case 'PhotometricInterpretation': switch ( $val ) { + case 0: + case 1: case 2: + case 3: + case 4: + case 5: case 6: + case 8: + case 9: + case 10: + case 32803: + case 34892: $val = $this->exifMsg( $tag, $val ); break; default: diff --git a/languages/i18n/en.json b/languages/i18n/en.json index c97b08e..874ef79 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -2997,8 +2997,18 @@ "exif-compression-34712": "JPEG2000", "exif-copyrighted-true": "Copyrighted", "exif-copyrighted-false": "Copyright status not set", + "exif-photometricinterpretation-0": "Black and white (White is 0)", + "exif-photometricinterpretation-1": "Black and white (Black is 0)", "exif-photometricinterpretation-2": "RGB", + "exif-photometricinterpretation-3": "Palette", + "exif-photometricinterpretation-4": "Transparency mask", + "exif-photometricinterpretation-5": "Seperated (Probably CMYK)", "exif-photometricinterpretation-6": "YCbCr", + "exif-photometricinterpretation-8": "CIE L*a*b*", + "exif-photometricinterpretation-9": "CIE L*a*b* (ICC encoding)", + "exif-photometricinterpretation-10": "CIE L*a*b* (ITU encoding)", + "exif-photometricinterpretation-32803": "Color Filter Array", + "exif-photometricinterpretation-34892": "Linear raw", "exif-unknowndate": "Unknown date", "exif-orientation-1": "Normal", "exif-orientation-2": "Flipped horizontally", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index 7298f4e..c843397 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -3170,8 +3170,19 @@ "exif-compression-34712": "{{optional}}", "exif-copyrighted-true": "The image is under copyright (including if its copyrighted but freely licensed)", "exif-copyrighted-false": "Copyright status is not set in the file.\n\nCompare: {{msg-mw|exif-copyrighted-true}}.", - "exif-photometricinterpretation-2": "{{optional}}", - "exif-photometricinterpretation-6": "{{optional}}", + "exif-photometricinterpretation-0": "{{optional}} Black and white image. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-1": "{{optional}} Black and white image. Commons for B&W tiffs. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-2": "{{optional}} RGB (red green blue) image. Common for colour tiffs. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-3": "{{optional}} See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-4": "{{optional}} See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-5": "{{optional}} See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-6": "{{optional}}\nYCbCr encoding. Common for jpeg images and tiffs with jpeg compressed data", + "exif-photometricinterpretation-8": "{{optional}}\nSee http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-9": "{{optional}}\nSee http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-10": "{{optional}}\nSee http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-32803": "{{optional}}. Used mostly by DNG images. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-photometricinterpretation-34892": "{{optional}}\n Used mostly by DNG images. See http://www.awaresystems.be/imaging/tiff/tifftags/photometricinterpretation.html", + "exif-unknowndate": "Used if the Exif date and time is \"<code>0000:00:00 00:00:00</code>\".\n\nRelated Exif attributes:\n* {{msg-mw|Exif-datetime}}\n* {{msg-mw|Exif-datetimeoriginal}}\n* {{msg-mw|Exif-datetimedigitized}}\n* {{msg-mw|Exif-datetimereleased}}\n* {{msg-mw|Exif-datetimeexpires}}\n* {{msg-mw|Exif-gpsdatestamp}}\n* {{msg-mw|Exif-dc-date}}\n* {{msg-mw|Exif-datetimemetadata}}", "exif-orientation-1": "0th row: top; 0th column: left\n{{Related|Exif-orientation}}\n{{Identical|Normal}}", "exif-orientation-2": "0th row: top; 0th column: right\n{{Related|Exif-orientation}}", -- To view, visit https://gerrit.wikimedia.org/r/251128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I31b78d093668cec076b7f3599acee528229737f6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brian Wolff <[email protected]> Gerrit-Reviewer: Aaron Schulz <[email protected]> Gerrit-Reviewer: Gergő Tisza <[email protected]> Gerrit-Reviewer: MarkTraceur <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
