[ansel] Patch to lib/Exif.php

Heath S. Hendrickson heath at outerspaceconsultants.com
Tue May 11 19:02:32 PDT 2004


I made a simple modification to lib/Exif.php so that it displays "0 EV" 
when the exposure bias value is any fraction with a numerator of 0.  
Before it would just display it as "0/32 EV" (in the case of my camera, 
anyway).

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	12 May 2004 02:01:33 -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;
 


More information about the ansel mailing list