From 1bbc49eba6a659f8d588fc9058dca4aa68c44171 Mon Sep 17 00:00:00 2001 From: HumanDynamo Date: Sun, 27 Jul 2008 16:13:21 +0000 Subject: [PATCH] missing to encode XML packet before to writte XMP into PNG --- src/pngimage.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pngimage.cpp b/src/pngimage.cpp index 91ad724e..45ab2d40 100644 --- a/src/pngimage.cpp +++ b/src/pngimage.cpp @@ -305,6 +305,15 @@ namespace Exiv2 } } + if (writeXmpFromPacket() == false) + { + if (XmpParser::encode(xmpPacket_, xmpData_)) + { +#ifndef SUPPRESS_WARNINGS + std::cerr << "Error: Failed to encode XMP metadata.\n"; +#endif + } + } if (xmpPacket_.size() > 0) { // Update Xmp data to a new uncompressed iTXt PNG chunk