[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:42:18 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=373455c
The following commit has been merged in the master branch:
commit 373455c0ac99743e3112e313035144085a2cd6a4
Author: Andreas Huggel <ahuggel at gmx.net>
Date: Fri Mar 4 02:07:46 2011 +0000
#761: Changed Image::setMetadata() to check if writing is supported (Matthias Baas).
---
src/image.cpp | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/src/image.cpp b/src/image.cpp
index e1b91c5..9cb4757 100644
--- a/src/image.cpp
+++ b/src/image.cpp
@@ -119,7 +119,7 @@ namespace {
#endif // EXV_HAVE_LIBZ
{ ImageType::pgf, newPgfInstance, isPgfType, amReadWrite, amReadWrite, amReadWrite, amReadWrite },
{ ImageType::raf, newRafInstance, isRafType, amRead, amRead, amRead, amNone },
- { ImageType::xmp, newXmpInstance, isXmpType, amNone, amNone, amReadWrite, amNone },
+ { ImageType::xmp, newXmpInstance, isXmpType, amReadWrite, amReadWrite, amReadWrite, amNone },
{ ImageType::gif, newGifInstance, isGifType, amNone, amNone, amNone, amNone },
{ ImageType::psd, newPsdInstance, isPsdType, amRead, amRead, amRead, amNone },
{ ImageType::tga, newTgaInstance, isTgaType, amNone, amNone, amNone, amNone },
@@ -187,11 +187,19 @@ namespace Exiv2 {
void Image::setMetadata(const Image& image)
{
- setExifData(image.exifData());
- setIptcData(image.iptcData());
- setXmpPacket(image.xmpPacket());
- setXmpData(image.xmpData());
- setComment(image.comment());
+ if (checkMode(mdExif) & amWrite) {
+ setExifData(image.exifData());
+ }
+ if (checkMode(mdIptc) & amWrite) {
+ setIptcData(image.iptcData());
+ }
+ if (checkMode(mdXmp) & amWrite) {
+ setXmpPacket(image.xmpPacket());
+ setXmpData(image.xmpData());
+ }
+ if (checkMode(mdComment) & amWrite) {
+ setComment(image.comment());
+ }
}
void Image::clearExifData()
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list