From: Lutz Mueller Date: Sun, 1 May 2005 17:39:25 +0000 (+0200) Subject: 2005-05-01 Lutz Mueller X-Git-Tag: libexif-0_6_21-release~522 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f3f0ceed7ae77a8be27f1848634a27db49708ed;p=platform%2Fupstream%2Flibexif.git 2005-05-01 Lutz Mueller * libexif/exif-data.c (exif_data_fix): Don't create EXIF_IFD_1 if no thumbnail data is available. --- diff --git a/ChangeLog b/ChangeLog index 0ab4a56..fcbcd4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-01 Lutz Mueller + + * libexif/exif-data.c (exif_data_fix): Don't create EXIF_IFD_1 if no + thumbnail data is available. + 2005-04-30 Lutz Mueller * test/test-mem.c: Show how to create EXIF data. diff --git a/libexif/exif-data.c b/libexif/exif-data.c index d22dfd5..07e6293 100644 --- a/libexif/exif-data.c +++ b/libexif/exif-data.c @@ -1112,7 +1112,21 @@ exif_data_unset_option (ExifData *d, ExifDataOption o) 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