diff --git a/include/exiv2/webpimage.hpp b/include/exiv2/webpimage.hpp index 534d9f21..b6062694 100644 --- a/include/exiv2/webpimage.hpp +++ b/include/exiv2/webpimage.hpp @@ -80,6 +80,7 @@ namespace Exiv2 { @brief Not supported. Calling this function will throw an Error(32). */ void setComment(const std::string& comment); + void setIptcData(const IptcData& /*iptcData*/); //! @name Accessors //@{ diff --git a/src/image.cpp b/src/image.cpp index 3c08a4f4..6fc0e4aa 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -113,7 +113,7 @@ namespace { { ImageType::crw, newCrwInstance, isCrwType, amReadWrite, amNone, amNone, amReadWrite }, { ImageType::mrw, newMrwInstance, isMrwType, amRead, amRead, amRead, amNone }, { ImageType::tiff, newTiffInstance, isTiffType, amReadWrite, amReadWrite, amReadWrite, amNone }, - { ImageType::webp, newWebPInstance, isWebPType, amReadWrite, amReadWrite, amReadWrite, amNone }, + { ImageType::webp, newWebPInstance, isWebPType, amReadWrite, amNone, amReadWrite, amNone }, { ImageType::dng, newTiffInstance, isTiffType, amReadWrite, amReadWrite, amReadWrite, amNone }, { ImageType::nef, newTiffInstance, isTiffType, amReadWrite, amReadWrite, amReadWrite, amNone }, { ImageType::pef, newTiffInstance, isTiffType, amReadWrite, amReadWrite, amReadWrite, amNone }, diff --git a/src/webpimage.cpp b/src/webpimage.cpp index 89f5b71f..84f5a292 100644 --- a/src/webpimage.cpp +++ b/src/webpimage.cpp @@ -75,6 +75,12 @@ namespace Exiv2 { /* =========================================== */ + void WebPImage::setIptcData(const IptcData& /*iptcData*/) + { + // not supported + throw(Error(32, "IPTC metadata", "WebP")); + } + void WebPImage::setComment(const std::string& /*comment*/) { // not supported @@ -138,10 +144,6 @@ namespace Exiv2 { has_icc = true; } - if (iptcData_.count() > 0) { - copyIptcToXmp(iptcData_, xmpData_); - } - if (exifData_.count() > 0) { ExifParser::encode(blob, littleEndian, exifData_); if (blob.size() > 0) { @@ -150,11 +152,6 @@ namespace Exiv2 { } if (xmpData_.count() > 0) { - if (iptcData_.count() == 0) { - moveXmpToIptc(xmpData_, iptcData_); - iptcData_.clear(); - } - XmpParser::encode(xmpPacket_, xmpData_, XmpParser::useCompactFormat | XmpParser::omitAllFormatting); @@ -693,7 +690,6 @@ namespace Exiv2 { std::cout << "Display Hex Dump [size:" << (unsigned long)size << "]" << std::endl; std::cout << Internal::binaryToHex(rawExifData, size); #endif - moveXmpToIptc(xmpData_, iptcData_); } } else { io_->seek(size, BasicIo::cur);