Update of /cvsroot/libexif/libexif/libexif/canon
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12268/libexif/canon
Modified Files:
mnote-canon-entry.c
Log Message:
Fixed interpretation of Auto ISO and Self-Timer entries
Index: mnote-canon-entry.c
===================================================================
RCS file: /cvsroot/libexif/libexif/libexif/canon/mnote-canon-entry.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -p -d -r1.27 -r1.28
--- mnote-canon-entry.c 17 Feb 2008 18:31:56 -0000 1.27
+++ mnote-canon-entry.c 9 Oct 2008 09:47:30 -0000 1.28
@@ -633,8 +633,10 @@ mnote_canon_entry_get_value (const Mnote
vs = exif_get_short (data + 2 + t * 2, entry->order);
switch (t) {
case 0:
+ snprintf (val, maxlen, "%.3f", pow (2, (ExifSShort)vs / 32.0));
+ break;
case 1:
- snprintf (val, maxlen, "%.0f", apex_value_to_iso_speed(vs / 32.0));
+ snprintf (val, maxlen, "%.0f", apex_value_to_iso_speed ((ExifSShort)vs / 32.0));
break;
case 2:
case 5:
@@ -648,7 +650,7 @@ mnote_canon_entry_get_value (const Mnote
break;
case 4:
case 21:
- d = apex_value_to_shutter_speed(vs / 32.0);
+ d = apex_value_to_shutter_speed ((ExifSShort)vs / 32.0);
if (d < 1)
snprintf (val, maxlen, _("1/%d"),(int)(1.0 / d));
else
@@ -665,7 +667,7 @@ mnote_canon_entry_get_value (const Mnote
snprintf (val, maxlen, _("%u mm"), vs);
break;
case 28:
- if (!vs) {
+ if ((ExifSShort)vs <= 0) {
strncpy(val, _("Off"), maxlen);
break;
}
|