metadata: do not accidentally remove exif tags when embedding the arp sidecar in XMP
Fixes #127 (cherry picked from commit 49cbe9bd19db558a4be36221472cbb5e78aa95a2)
This commit is contained in:
committed by
Lawrence Lee
parent
393dbcf9f9
commit
322e709bcb
@@ -217,7 +217,7 @@ void Exiv2Metadata::do_merge_xmp(Exiv2::Image *dst) const
|
||||
}
|
||||
|
||||
|
||||
void Exiv2Metadata::saveToImage(const Glib::ustring &path) const
|
||||
void Exiv2Metadata::saveToImage(const Glib::ustring &path, bool preserve_all_tags) const
|
||||
{
|
||||
auto dst = open_exiv2(path, false);
|
||||
if (image_.get()) {
|
||||
@@ -227,7 +227,9 @@ void Exiv2Metadata::saveToImage(const Glib::ustring &path) const
|
||||
do_merge_xmp(dst.get());
|
||||
}
|
||||
auto srcexif = image_->exifData();
|
||||
remove_unwanted(srcexif);
|
||||
if (!preserve_all_tags) {
|
||||
remove_unwanted(srcexif);
|
||||
}
|
||||
dst->setExifData(srcexif);
|
||||
} else {
|
||||
dst->setExifData(exif_data_);
|
||||
|
||||
Reference in New Issue
Block a user