[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/libs/libkexiv2
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2007-03-11 10:29:52
Message-ID: 1173608992.677037.1920.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 641435 by cgilles:

libkexiv2 from trunk : set the Exif.Image.Software tag only if it doesn't exist.
BUG: 142564


 M  +16 -4     kexiv2.cpp  


--- trunk/extragear/libs/libkexiv2/kexiv2.cpp #641434:641435
@@ -450,10 +450,22 @@
 {
     try
     {
-        QString software(program);
-        software.append("-");
-        software.append(version);
-        d->exifMetadata["Exif.Image.Software"]              = software.ascii();
+        // Check if Exif.Image.Software already exist. If yes, do not touch this tag.
+            
+        if (!d->exifMetadata.empty())
+	{
+            Exiv2::ExifData exifData(d->exifMetadata);
+            Exiv2::ExifKey key("Exif.Image.Software");
+            Exiv2::ExifData::iterator it = exifData.findKey(key);
+       
+            if (it == exifData.end())
+	    {
+                QString software(program);
+                software.append("-");
+                software.append(version);
+                d->exifMetadata["Exif.Image.Software"]      = software.ascii();
+	    }
+	}
 
         d->iptcMetadata["Iptc.Application2.Program"]        = program.ascii();
         d->iptcMetadata["Iptc.Application2.ProgramVersion"] = version.ascii();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic