[gthumb] Rotating image destroys XMP and IPTC metadata
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] Rotating image destroys XMP and IPTC metadata
- Date: Sun, 1 Dec 2013 13:49:08 +0000 (UTC)
commit 3dfbaa3d1debb1a26d53cd99e9a065d254bf0918
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sun Dec 1 14:46:34 2013 +0100
Rotating image destroys XMP and IPTC metadata
[bug #719622]
extensions/exiv2_tools/exiv2-utils.cpp | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/extensions/exiv2_tools/exiv2-utils.cpp b/extensions/exiv2_tools/exiv2-utils.cpp
index 6e38ba3..1eb0776 100644
--- a/extensions/exiv2_tools/exiv2-utils.cpp
+++ b/extensions/exiv2_tools/exiv2-utils.cpp
@@ -1201,6 +1201,7 @@ exiv2_write_metadata_private (Exiv2::Image::AutoPtr image,
ed["Exif.Image.DateTime"] = date_time;
g_free (date_time);
}
+ ed.sortByKey();
// IPTC Data
@@ -1249,6 +1250,7 @@ exiv2_write_metadata_private (Exiv2::Image::AutoPtr image,
g_free (key);
}
+ id.sortByKey();
g_strfreev (attributes);
// XMP Data
@@ -1259,13 +1261,6 @@ exiv2_write_metadata_private (Exiv2::Image::AutoPtr image,
gpointer metadatum = (GthMetadata *) g_file_info_get_attribute_object (info, attributes[i]);
char *key = exiv2_key_from_attribute (attributes[i]);
- // Remove existing tags of the same type.
- // Seems to be needed for storing category keywords.
- // Not exactly sure why!
- /*Exiv2::XmpData::iterator iter = xd.findKey (Exiv2::XmpKey (key));
- if (iter != xd.end ())
- xd.erase (iter);*/
-
try {
const char *value_type;
@@ -1305,6 +1300,7 @@ exiv2_write_metadata_private (Exiv2::Image::AutoPtr image,
g_free (key);
}
+ xd.sortByKey();
g_strfreev (attributes);
try {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]