(bug 31637) Do not extract tiff:Orientation from XMP data, since then it will be...
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 12 Oct 2011 14:13:06 +0000 (14:13 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 12 Oct 2011 14:13:06 +0000 (14:13 +0000)
Most people only really expect the Exif data to be used for rotating images (if that), so its unexpected when the xmp property causes an image to be rotated. So disable extracting that property from XMP.

includes/media/XMPInfo.php

index 4dbc1cb..1d580ff 100644 (file)
@@ -557,13 +557,16 @@ class XMPInfo {
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_SIMPLE,
                        ),
-                       'Orientation'       => array(
-                               'map_group' => 'exif',
-                               'mode'      => XMPReader::MODE_SIMPLE,
-                               'validate'  => 'validateClosed',
-                               'choices'   => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true,
-                                               '6' => true, '7' => true, '8' => true ),
-                       ),
+                       /**** Do not extract this property
+                        * It interferes with auto exif rotation.
+                        * 'Orientation'       => array(
+                        *      'map_group' => 'exif',
+                        *      'mode'      => XMPReader::MODE_SIMPLE,
+                        *      'validate'  => 'validateClosed',
+                        *      'choices'   => array( '1' => true, '2' => true, '3' => true, '4' => true, 5 => true,
+                        *                      '6' => true, '7' => true, '8' => true ),
+                        *),
+                        ******/
                        'PhotometricInterpretation' => array(
                                'map_group' => 'exif',
                                'mode'      => XMPReader::MODE_SIMPLE,