metadata: do not copy Exif tags with 0 count
Tentative fix for #147 (cherry picked from commit 12f699df10c1c0854c0e882db151560a1f4f3a26)
This commit is contained in:
parent
92befa7e81
commit
d16bc6f6ea
@ -230,7 +230,12 @@ void Exiv2Metadata::saveToImage(const Glib::ustring &path, bool preserve_all_tag
|
||||
if (!preserve_all_tags) {
|
||||
remove_unwanted(srcexif);
|
||||
}
|
||||
dst->setExifData(srcexif);
|
||||
//dst->setExifData(srcexif);
|
||||
for (auto &tag : srcexif) {
|
||||
if (tag.count() > 0) {
|
||||
dst->exifData()[tag.key()] = tag;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dst->setExifData(exif_data_);
|
||||
dst->setIptcData(iptc_data_);
|
||||
|
Loading…
x
Reference in New Issue
Block a user