[Digikam-devel] extragear/graphics/digikam/libs/dmetadata

Gilles Caulier caulier.gilles at free.fr
Wed May 31 20:43:35 BST 2006


SVN commit 547082 by cgilles:

digikam from trunk : DMetadata : add version Exiv2 version checking rule about to use new Exiv2 methods provides by future 0.10.0.

Here the implementation use Exiv2::Photoshop::setIptcIrb() to add irb IPTC header require during storage of IPTC metadata into tiff file.

Nota : you can only store IPTC into TIFF using current Exiv2 implementation from svn.

CCMAIL: digikam-devel at kde.org


 M  +13 -4     dmetadata.cpp  


--- trunk/extragear/graphics/digikam/libs/dmetadata/dmetadata.cpp #547081:547082
@@ -120,10 +120,19 @@
             Exiv2::IptcData& iptc = d->iptcMetadata;
             Exiv2::DataBuf c2;
 
-// FIXME : add exiv2 version rules here
-/*            if (addIrbHeader) 
-                c2 = Exiv2::Photoshop::setIptcIrb(0, 0, iptc);
-            else */
+            if (addIrbHeader) 
+            {
+#ifdef EXIV2_CHECK_VERSION 
+                if (EXIV2_CHECK_VERSION(0,10,0))
+                    c2 = Exiv2::Photoshop::setIptcIrb(0, 0, iptc);
+                else
+                {
+                    kdDebug() << "Exiv2 version is to old. Cannot add Irb header to IPTC metadata" << endl;
+                    return QByteArray();
+                }
+#endif
+            }
+            else 
                 c2 = iptc.copy();
 
             QByteArray data(c2.size_);



More information about the Digikam-devel mailing list