From 5cb1f80bd10bab7a142e312d9d96e426793548cc Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Mon, 9 May 2011 03:48:06 +0000 Subject: [PATCH] (bug 28883) Add messages for compression types (metadata) commonly used by Tiffs. I used the list of common compression schemes at 'pedia: http://en.wikipedia.org/wiki/TIFF#TIFF_Compression_Tag --- RELEASE-NOTES-1.19 | 2 ++ includes/media/FormatMetadata.php | 4 +++- languages/messages/MessagesEn.php | 11 ++++++++++- languages/messages/MessagesQqq.php | 10 +++++++++- maintenance/language/messageTypes.inc | 15 +++++++++++++++ maintenance/language/messages.inc | 9 +++++++++ 6 files changed, 48 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index ab819c453d..9385aab51a 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -23,6 +23,8 @@ production. * (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge. * (bug 28868) Show total pages in the subtitle of an image on the file description page for multi-paged documents. +* (bug 28883) Message names for different compression types commonly +used in Tiff files. === API changes in 1.19 === diff --git a/includes/media/FormatMetadata.php b/includes/media/FormatMetadata.php index 03324a97bc..296d0e92a3 100644 --- a/includes/media/FormatMetadata.php +++ b/includes/media/FormatMetadata.php @@ -123,7 +123,9 @@ class FormatMetadata { switch( $tag ) { case 'Compression': switch( $val ) { - case 1: case 6: + case 1: case 2: case 3: case 4: + case 5: case 6: case 7: case 8: + case 32773: case 32946: case 34712: $val = self::msg( $tag, $val ); break; default: diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index f8a0ad4d8f..cd0bfd65c1 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3933,7 +3933,16 @@ $8', # only translate this message to other languages if you have to change it # EXIF attributes 'exif-compression-1' => 'Uncompressed', -'exif-compression-6' => 'JPEG', # only translate this message to other languages if you have to change it +'exif-compression-2' => 'CCITT Group 3 1-Dimensional Modified Huffman run length encoding', +'exif-compression-3' => 'CCITT Group 3 fax encoding', +'exif-compression-4' => 'CCITT Group 4 fax encoding', +'exif-compression-5' => 'LZW', +'exif-compression-6' => 'JPEG (old)', # only translate this message to other languages if you have to change it +'exif-compression-7' => 'JPEG', +'exif-compression-8' => 'Deflate (Adobe)', +'exif-compression-32773' => 'PackBits (Macintosh RLE)', +'exif-compression-32946' => 'Deflate (PKZIP)', +'exif-compression-34712' => 'JPEG2000', 'exif-copyrighted-true' => 'Copyrighted', 'exif-copyrighted-false' => 'Public domain', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 8f14a52d5e..622f41c5bd 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -3212,7 +3212,9 @@ $1 is the value of the property (in one language), $2 is the language name that {{Identical|Height}}', 'exif-bitspersample' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].', -'exif-compression' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].', +'exif-compression' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail]. + +This field labels what the compression of the image is. It is commonly seen in Tiff images. It uses messages like {{msg-mw|exif-compression-1}} for the value. http://en.wikipedia.org/wiki/TIFF#TIFF_Compression_Tag has information about this field.', 'exif-photometricinterpretation' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].', 'exif-orientation' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].', 'exif-samplesperpixel' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].', @@ -3526,7 +3528,13 @@ Note, not all fields are guaranteed to be present, some may be empty strings.', *$2 is one of 17 broad categories that the code falls into. For example any code starting with 15 has the contents of {{msg-mw|exif-iimcategory-spo}} for $2.', # EXIF attributes +'exif-compression-5' => 'Lempel-Ziv & Welch algorithm {{optional}}', 'exif-compression-6' => '{{optional}}', +'exif-compression-7' => '{{optional}}', +'exif-compression-8' => '{{optional}}', +'exif-compression-32773' => '{{optional}}', +'exif-compression-32946' => '{{optional}}', +'exif-compression-34712' => '{{optional}}', 'exif-copyrighted-true' => 'The image is under copyright (including if its copyrighted but freely licensed)', 'exif-copyrighted-false' => 'The image is Public domain', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 5b3a8e1992..f6b6008c51 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -278,7 +278,13 @@ $wgOptionalMessages = array( 'widthheight', 'exif-fnumber-format', 'exif-focallength-format', + 'exif-compression-5', 'exif-compression-6', + 'exif-compression-7', + 'exif-compression-8', + 'exif-compression-32773', + 'exif-compression-32946', + 'exif-compression-34712', 'exif-photometricinterpretation-2', 'exif-photometricinterpretation-6', 'exif-xyresolution-i', @@ -588,7 +594,16 @@ $wgEXIFMessages = array( 'exif-contact-value', 'exif-subjectnewscode-value', 'exif-compression-1', + 'exif-compression-2', + 'exif-compression-3', + 'exif-compression-4', + 'exif-compression-5', 'exif-compression-6', + 'exif-compression-7', + 'exif-compression-8', + 'exif-compression-32773', + 'exif-compression-32946', + 'exif-compression-34712', 'exif-copyrighted-true', 'exif-copyrighted-false', 'exif-photometricinterpretation-2', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 714512644a..8647fe9121 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2849,7 +2849,16 @@ $wgMessageStructure = array( ), 'exif-compression' => array( 'exif-compression-1', + 'exif-compression-2', + 'exif-compression-3', + 'exif-compression-4', + 'exif-compression-5', 'exif-compression-6', + 'exif-compression-7', + 'exif-compression-8', + 'exif-compression-32773', + 'exif-compression-32946', + 'exif-compression-34712', ), 'exif-copyrighted' => array( 'exif-copyrighted-true', -- 2.20.1