Exif.php patch

"Heath S. Hendrickson" <[email protected]>
Newsgroups gmane.comp.horde.ansel
Message-ID <[email protected]>
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

-- 
ansel mailing list - Join the hunt: http://horde.org/bounties/#ansel
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
Exif.php.patch_fixExposureBiasValue_and_newFields (text/plain, 2.1 KB)
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")
         );
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.