[ansel] Exif.php patch

Heath S. Hendrickson heath at outerspaceconsultants.com
Thu May 13 19:00:27 PDT 2004


Attached is a patch to lib/Exif.php that adds some extra fields to the 
magic decoder ring.  This patch also includes the previously submitted 
change to the ExposureBias decoder to make it properly display 0 EV 
instead of 0/32 EV.  If that one has already been committed, then just 
delete it from the patch before applying.

h
-------------- next part --------------
Index: lib/Exif.php
===================================================================
RCS file: /usr/local/horde/cvs/ansel/lib/Exif.php,v
retrieving revision 1.13
diff -u -r1.13 Exif.php
--- lib/Exif.php	31 Mar 2004 20:17:29 -0000	1.13
+++ lib/Exif.php	14 May 2004 01:50:02 -0000
@@ -179,7 +179,11 @@
         case 'ExposureBiasValue':
             if (strpos($data, '/') !== false) {
                 list($n, $d) = explode('/', $data, 2);
-                return $data . ' EV';
+                if ($n == 0) {
+                    return '0 EV';
+                } else {
+                    return $data . ' EV';
+                }
             }
             break;
 
@@ -212,6 +216,9 @@
         case 'FocalLength':
             return $data . ' mm';
 
+        case 'FocalLengthIn35mmFilm':
+            return $data . ' mm';
+
         case 'Flash':
             switch ($data) {
             case 0: return _("No Flash");
@@ -279,6 +286,8 @@
                      'ImageType' => _("Image Type"),
                      'FileSize' => _("File Size"),
                      'DateTime' => _("Image Taken"),
+                     'DateTimeOriginal' => _("Original Image Taken"),
+                     'DateTimeDigitized' => _("Image Digitized"),
                      'ExifImageWidth' => _("Width"),
                      'ExifImageLength' => _("Height"),
                      'XResolution' => _("X Resolution"),
@@ -286,6 +295,7 @@
                      'ShutterSpeedValue' => _("Shutter Speed"),
                      'ExposureTime' => _("Exposure"),
                      'FocalLength' => _("Focal Length"),
+                     'FocalLengthIn35mmFilm' => _("Focal Length (35mm equiv)"),
                      'ApertureValue' => _("Aperture"),
                      'FNumber' => _("F-Number"),
                      'ISOSpeedRatings' => _("ISO Setting"),
@@ -299,6 +309,7 @@
                      'WhiteBalance' => _("White Balance"),
                      'Orientation' => _("Camera Orientation"),
                      'Copyright' => _("Copyright"),
+                     'Artist' => _("Artist")
         );
     }
 


More information about the ansel mailing list