Store original media dimensions as additional header
[lhc/web/wiklou.git] / includes / media / Exif.php
index 11178f4..621a4aa 100644 (file)
@@ -117,6 +117,11 @@ class Exif {
                 * @link http://exif.org/Exif2-2.PDF The Exif 2.2 specification
                 */
                $this->mExifTags = [
+                       'COMPUTED' => [
+                               'Width' => Exif::SHORT_OR_LONG, # Image width
+                               'Height' => Exif::SHORT_OR_LONG, # Image height
+                       ],
+
                        # TIFF Rev. 6.0 Attribute Information (p22)
                        'IFD0' => [
                                # Tags relating to image structure
@@ -174,8 +179,8 @@ class Exif {
                                # Tags relating to image configuration
                                'ComponentsConfiguration' => Exif::UNDEFINED, # Meaning of each component #p33
                                'CompressedBitsPerPixel' => Exif::RATIONAL, # Image compression mode
-                               'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image width
-                               'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image height
+                               'PixelYDimension' => Exif::SHORT_OR_LONG, # Valid image height
+                               'PixelXDimension' => Exif::SHORT_OR_LONG, # Valid image width
 
                                # Tags relating to related user information
                                'MakerNote' => Exif::IGNORE, # Manufacturer notes