+2007-11-13 Dan Fandrich <dan@coneharvesters.com>
+ * Added support for a new macro NO_VERBOSE_TAG_DATA to allow
+ some size reduction but still retain the ability to properly
+ interpret each tag.
+ * Added an end-of-table marker in the Canon color_information
+ makernote table that could otherwise potentially cause a crash
+ on a bad image.
+
2007-11-12 Dan Fandrich <dan@coneharvesters.com>
* Added support for more Olympus makernotes, based on data on
Phil Harvey's ExifTool page at
* Bug fixes: #1773810, #1774626
* Enhanced support of Canon and Olympus makernotes
* Added support for Sanyo makernotes
- * Added support for the NO_VERBOSE_TAG_STRINGS macro for embedded
- applications
+ * Added support for the NO_VERBOSE_TAG_STRINGS and NO_VERBOSE_TAG_DATA
+ macros to reduce size for embedded applications
libexif-0.6.16 (2007-06-12) since 0.6.1.15 (2007-05-23):
ExifShort value;
const char *name;
} entries_settings_1 [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ 0, 1, N_("Macro")},
{ 0, 2, N_("Normal")},
{ 2, 1, N_("Economy")},
{40, 0x0500, N_("Full")},
{40, 0x0502, N_("2/3")},
{40, 0x0504, N_("1/3")},
+#endif
{ 0, 0, NULL}
},
entries_focal_length [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 1, N_("Fixed")},
{0, 2, N_("Zoom")},
+#endif
{0, 0, NULL}
},
entries_settings_2 [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ 6, 0, N_("Auto")},
{ 6, 1, N_("Sunny")},
{ 6, 2, N_("Cloudy")},
{ 32, 0x0014, N_("1/3")},
{ 32, 0x008c, N_("2/3")},
{ 32, 0x07d0, N_("Full")},
+#endif
{0, 0, NULL}
},
entries_panorama [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 0, N_("Left to right")},
{0, 1, N_("Right to left")},
{0, 2, N_("Bottom to top")},
{0, 3, N_("Top to bottom")},
{0, 4, N_("2x2 matrix (clockwise)")},
+#endif
{0, 0, NULL}
},
color_information [] = {
+#ifndef NO_VERBOSE_TAG_DATA
{0, 0, N_("Standard")},
{0, 1, N_("Manual")},
{0, 2, N_("Custom")},
{9, 0x84, N_("Neutral")},
{9, 0x85, N_("Faithful")},
{9, 0x86, N_("Monochrome")},
+#endif
+ {0, 0, NULL}
};
static void
const char *title;
const char *description;
} table[] = {
+#ifndef NO_VERBOSE_TAG_STRINGS
{MNOTE_CANON_TAG_SETTINGS_1, "Settings1", N_("Settings (first part)"), ""},
{MNOTE_CANON_TAG_FOCAL_LENGTH, "FocalLength", N_("Focal length"), ""},
{MNOTE_CANON_TAG_SETTINGS_2, "Settings2", N_("Settings (second part)"), ""},
{MNOTE_CANON_TAG_COLOR_INFORMATION, "ColorInformation", N_("Color information"), ""},
{MNOTE_CANON_TAG_SERIAL_NUMBER, "SerialNumber", N_("Serial number"), ""},
{MNOTE_CANON_TAG_CUSTOM_FUNCS, "CustomFunctions", N_("Custom functions"), ""},
+#endif
{0, NULL, NULL, NULL}
};
unsigned int subtag;
const char *name;
} table_sub[] = {
+#ifndef NO_VERBOSE_TAG_STRINGS
{MNOTE_CANON_TAG_SETTINGS_1, 0, N_("Macro mode")},
{MNOTE_CANON_TAG_SETTINGS_1, 1, N_("Self-timer")},
{MNOTE_CANON_TAG_SETTINGS_1, 2, N_("Quality")},
{MNOTE_CANON_TAG_COLOR_INFORMATION, 2, N_("Sharpness frequency")},
{MNOTE_CANON_TAG_COLOR_INFORMATION, 7, N_("White balance")},
{MNOTE_CANON_TAG_COLOR_INFORMATION, 9, N_("Picture style")},
+#endif
{0, 0, NULL}
};
ExifTag tag;
const char *strings[10];
} list[] = {
-#ifndef NO_VERBOSE_TAG_STRINGS
+#ifndef NO_VERBOSE_TAG_DATA
{ EXIF_TAG_PLANAR_CONFIGURATION,
{ N_("chunky format"), N_("planar format"), NULL}},
{ EXIF_TAG_SENSING_METHOD,
const char *values[4];
} elem[25];
} list2[] = {
-#ifndef NO_VERBOSE_TAG_STRINGS
+#ifndef NO_VERBOSE_TAG_DATA
{ EXIF_TAG_METERING_MODE,
{ { 0, {N_("Unknown"), NULL}},
{ 1, {N_("Average"), N_("avg"), NULL}},
const char *string;
} elem[10];
} items[] = {
-#ifndef NO_VERBOSE_TAG_STRINGS
+#ifndef NO_VERBOSE_TAG_DATA
{ MNOTE_NIKON_TAG_LENSTYPE, EXIF_FORMAT_BYTE,
{ {0, N_("AF non D Lens")},
{1, N_("Manual")},
const char *string;
} elem[33];
} items[] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ MNOTE_PENTAX_TAG_MODE,
{ {0, N_("Auto")},
{1, N_("Night-scene")},
{ {0, N_("Off")},
{1, N_("On")},
{0, NULL}}},
+#endif
{0, {{0, NULL}}}
};
const char *string;
} elem[39];
} items2[] = {
+#ifndef NO_VERBOSE_TAG_DATA
{ MNOTE_PENTAX2_TAG_IMAGE_SIZE,
{ {0, 0, "2304x1728"},
{4, 0, "1600x1200"},
{5, 2, N_("Portrait")},
{6, 2, N_("Landscape")},
{0, 0, NULL}}},
+#endif
{0, {{0, 0, NULL}}}
};
/* search the tag */
for (i = 0; (items[i].tag && items[i].tag != entry->tag); i++);
if (!items[i].tag) {
- strncpy (val, _("Internal error"), maxlen);
+ snprintf (val, maxlen,
+ _("Internal error (unknown value %i)"), vs);
break;
}
/* search the tag */
for (i = 0; (items2[i].tag && items2[i].tag != entry->tag); i++);
if (!items2[i].tag) {
- strncpy (val, _("Internal error"), maxlen);
+ snprintf (val, maxlen,
+ _("Internal error (unknown value %i %i)"), vs, vs2);
break;
}
const char *title;
const char *description;
} table[] = {
+#ifndef NO_VERBOSE_TAG_STRINGS
{MNOTE_PENTAX_TAG_MODE, "Mode", N_("Capture Mode"), ""},
{MNOTE_PENTAX_TAG_QUALITY, "Quality", N_("Quality Level"), ""},
{MNOTE_PENTAX_TAG_FOCUS, "Focus", N_("Focus Mode"), ""},
{MNOTE_CASIO2_TAG_OBJECT_DISTANCE, "ObjectDistance", N_("Object Distance"), N_("Distance of photographed object in millimeters.")},
{MNOTE_CASIO2_TAG_TIME_ZONE, "TimeZone", N_("Time Zone"), ""},
{MNOTE_CASIO2_TAG_BESTSHOT_MODE, "BestshotMode", N_("Bestshot mode"), ""},
+#endif
{0, NULL, NULL, NULL}
};