|
|
@ -526,11 +526,15 @@ namespace Exiv2 {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (writeXmpFromPacket() == false) {
|
|
|
|
if (writeXmpFromPacket() == false) {
|
|
|
|
if (XmpParser::encode(xmpPacket_, xmpData_)) {
|
|
|
|
std::string tmpXmpPacket;
|
|
|
|
|
|
|
|
if (XmpParser::encode(tmpXmpPacket, xmpData_)) {
|
|
|
|
#ifndef SUPPRESS_WARNINGS
|
|
|
|
#ifndef SUPPRESS_WARNINGS
|
|
|
|
std::cerr << "Warning: Failed to encode XMP metadata.\n";
|
|
|
|
std::cerr << "Error: Failed to encode XMP metadata.\n";
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
xmpPacket_ = tmpXmpPacket;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (xmpPacket_.size() > 0) {
|
|
|
|
if (xmpPacket_.size() > 0) {
|
|
|
|
// Write APP1 marker, size of APP1 field, XMP id and XMP packet
|
|
|
|
// Write APP1 marker, size of APP1 field, XMP id and XMP packet
|
|
|
|