* libexif/exif-data.c (exif_data_fix): Don't create EXIF_IFD_1 if no
thumbnail data is available.
+2005-05-01 Lutz Mueller <lutz@users.sourceforge.net>
+
+ * libexif/exif-data.c (exif_data_fix): Don't create EXIF_IFD_1 if no
+ thumbnail data is available.
+
2005-04-30 Lutz Mueller <lutz@users.sourceforge.net>
* test/test-mem.c: Show how to create EXIF data.
static void
fix_func (ExifContent *c, void *data)
{
- exif_content_fix (c);
+ switch (exif_content_get_ifd (c)) {
+ case EXIF_IFD_1:
+ if (c->parent->data)
+ exif_content_fix (c);
+ else {
+ exif_log (c->parent->priv->log, EXIF_LOG_CODE_DEBUG, "exif-data",
+ "No thumbnail but entries on thumbnail. These entries have been "
+ "removed.");
+ while (c->count)
+ exif_content_remove_entry (c, c->entries[c->count - 1]);
+ }
+ break;
+ default:
+ exif_content_fix (c);
+ }
}
void