Commit 3dfbaa3d authored by Paolo Bacchilega's avatar Paolo Bacchilega

Rotating image destroys XMP and IPTC metadata

[bug #719622]
parent a8c2b3c3
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment