6fd9840
Index: libkexiv2/kexiv2comments.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2comments.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2comments.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,10 +10,6 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because
6fd9840
- *       it will be multithreaded. Use qDebug() instead.
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
@@ -47,7 +43,8 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         std::string s(e.what());
6fd9840
-        qDebug("%s (Error #%i: %s)", "Cannot check Comment access mode using Exiv2 ", e.code(), s.c_str());
6fd9840
+        kDebug(51003) << "Cannot check Comment access mode using Exiv2 (Error #" 
6fd9840
+                      << e.code() << ": " << s.c_str() << ")" << endl;
6fd9840
     }
6fd9840
 
6fd9840
     return false;
6fd9840
Index: libkexiv2/kexiv2gps.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2gps.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2gps.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,20 +10,16 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
  * either version 2, or (at your option) any later version.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * This program is distributed in the hope that it will be useful,
6fd9840
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
6fd9840
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fd9840
  * GNU General Public License for more details.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * ============================================================ */
6fd9840
 
6fd9840
 // C++ includes.
6fd9840
@@ -185,7 +181,7 @@
6fd9840
             Exiv2::ExifKey exifKey3("Exif.GPSInfo.GPSAltitude");
6fd9840
             Exiv2::ExifData exifData(d->exifMetadata);
6fd9840
             Exiv2::ExifData::iterator it = exifData.findKey(exifKey3);
6fd9840
-            if (it != exifData.end())
6fd9840
+            if (it != exifData.end() && (*it).count())
6fd9840
             {
6fd9840
                 num = (double)((*it).toRational(0).first);
6fd9840
                 den = (double)((*it).toRational(0).second);
6fd9840
@@ -226,7 +222,7 @@
6fd9840
         Exiv2::ExifKey exifKey("Exif.GPSInfo.GPSLatitude");
6fd9840
         Exiv2::ExifData exifData(d->exifMetadata);
6fd9840
         Exiv2::ExifData::iterator it = exifData.findKey(exifKey);
6fd9840
-        if (it != exifData.end())
6fd9840
+        if (it != exifData.end() && (*it).count() == 3)
6fd9840
         {
6fd9840
             return convertToGPSCoordinateString((*it).toRational(0).first, (*it).toRational(0).second,
6fd9840
                                                 (*it).toRational(1).first, (*it).toRational(1).second,
6fd9840
@@ -258,7 +254,7 @@
6fd9840
         Exiv2::ExifKey exifKey("Exif.GPSInfo.GPSLongitude");
6fd9840
         Exiv2::ExifData exifData(d->exifMetadata);
6fd9840
         Exiv2::ExifData::iterator it = exifData.findKey(exifKey);
6fd9840
-        if (it != exifData.end())
6fd9840
+        if (it != exifData.end() && (*it).count() == 3)
6fd9840
         {
6fd9840
             return convertToGPSCoordinateString((*it).toRational(0).first, (*it).toRational(0).second,
6fd9840
                                                 (*it).toRational(1).first, (*it).toRational(1).second,
6fd9840
@@ -276,7 +272,6 @@
6fd9840
     return QString();
6fd9840
 }
6fd9840
 
6fd9840
-
6fd9840
 bool KExiv2::setGPSInfo(double altitude, double latitude, double longitude, bool setProgramName) const
6fd9840
 {
6fd9840
     if (!setProgramId(setProgramName))
6fd9840
@@ -425,7 +420,7 @@
6fd9840
         // Altitude reference: byte "00" meaning "above sea level", "01" mening "behing sea level".
6fd9840
         value = Exiv2::Value::create(Exiv2::unsignedByte);
6fd9840
         if (altitude >= 0) value->read("0");
6fd9840
-	else               value->read("1");
6fd9840
+        else               value->read("1");
6fd9840
         d->exifMetadata.add(Exiv2::ExifKey("Exif.GPSInfo.GPSAltitudeRef"), value.get());
6fd9840
 
6fd9840
         // And the actual altitude, as absolute value..
6fd9840
@@ -477,7 +472,7 @@
6fd9840
         return false;
6fd9840
 
6fd9840
     try
6fd9840
-    {  
6fd9840
+    {
6fd9840
         QStringList gpsTagsKeys;
6fd9840
 
6fd9840
         for (Exiv2::ExifData::iterator it = d->exifMetadata.begin();
6fd9840
@@ -489,7 +484,7 @@
6fd9840
                 gpsTagsKeys.append(key);
6fd9840
         }
6fd9840
 
6fd9840
-        for(QStringList::Iterator it2 = gpsTagsKeys.begin(); it2 != gpsTagsKeys.end(); ++it2)
7de6077
+        for(QStringList::const_iterator it2 = gpsTagsKeys.constBegin(); it2 != gpsTagsKeys.constEnd(); ++it2)
6fd9840
         {
6fd9840
             Exiv2::ExifKey gpsKey((*it2).toAscii().constData());
6fd9840
             Exiv2::ExifData::iterator it3 = d->exifMetadata.findKey(gpsKey);
6fd9840
@@ -630,7 +625,6 @@
6fd9840
     }
6fd9840
 }
6fd9840
 
6fd9840
-
6fd9840
 QString KExiv2::convertToGPSCoordinateString(long int numeratorDegrees, long int denominatorDegrees,
6fd9840
                                              long int numeratorMinutes, long int denominatorMinutes,
6fd9840
                                              long int numeratorSeconds, long int denominatorSeconds,
6fd9840
@@ -878,6 +872,4 @@
6fd9840
     *seconds = coordinate;
6fd9840
 }
6fd9840
 
6fd9840
-
6fd9840
-
6fd9840
 }  // NameSpace KExiv2Iface
6fd9840
Index: libkexiv2/kexiv2private.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2private.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2private.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -9,10 +9,6 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because
6fd9840
- *       it will be multithreaded. Use qDebug() instead.
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
7de6077
@@ -34,25 +30,19 @@
7de6077
 
6fd9840
 KExiv2Priv::KExiv2Priv()
6fd9840
 {
7de6077
+    writeRawFiles = false;
6fd9840
     imageComments = std::string();
6fd9840
-
6fd9840
-#ifdef _XMP_SUPPORT_
6fd9840
-    Exiv2::XmpProperties::registerNs("http://www.microsoft.com/Photo/", "MicrosoftPhoto");
6fd9840
-#endif
6fd9840
 }
6fd9840
 
6fd9840
 KExiv2Priv::~KExiv2Priv()
6fd9840
 {
6fd9840
-    // Fix memory leak if Exiv2 support XMP.
6fd9840
-#ifdef _XMP_SUPPORT_
6fd9840
-    Exiv2::XmpParser::terminate();
6fd9840
-#endif // _XMP_SUPPORT_
6fd9840
 }
6fd9840
 
6fd9840
 void KExiv2Priv::printExiv2ExceptionError(const QString& msg, Exiv2::Error& e)
6fd9840
 {
6fd9840
     std::string s(e.what());
6fd9840
-    qDebug("%s (Error #%i: %s)", msg.toAscii().constData(), e.code(), s.c_str());
6fd9840
+    kDebug(51003) << msg.toAscii().constData() << " (Error #" 
6fd9840
+                  << e.code() << ": " << s.c_str() << endl;
6fd9840
 }
6fd9840
 
6fd9840
 QString KExiv2Priv::convertCommentValue(const Exiv2::Exifdatum &exifDatum)
6fd9840
Index: libkexiv2/kexiv2exif.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2exif.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2exif.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,20 +10,16 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
  * either version 2, or (at your option) any later version.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * This program is distributed in the hope that it will be useful,
6fd9840
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
6fd9840
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fd9840
  * GNU General Public License for more details.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * ============================================================ */
6fd9840
 
6fd9840
 // Local includes.
6fd9840
@@ -47,7 +43,8 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         std::string s(e.what());
6fd9840
-        qDebug("%s (Error #%i: %s)", "Cannot check Exif access mode using Exiv2 ", e.code(), s.c_str());
6fd9840
+        kDebug(51003) << "Cannot check Exif access mode using Exiv2 (Error #" 
6fd9840
+                      << e.code() << ": " << s.c_str() << ")" << endl;
6fd9840
     }
6fd9840
 
6fd9840
     return false;
6fd9840
@@ -106,7 +103,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
+            kDebug(51003) << "From file " << d->filePath.toAscii().constData() << endl;
6fd9840
 
6fd9840
         d->printExiv2ExceptionError("Cannot get Exif data using Exiv2 ", e);
6fd9840
     }
6fd9840
@@ -134,7 +131,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
+            kDebug(51003) << "From file " << d->filePath.toAscii().constData() << endl;
6fd9840
 
6fd9840
         d->printExiv2ExceptionError("Cannot set Exif data using Exiv2 ", e);
6fd9840
     }
bf3fb43
@@ -618,11 +615,16 @@
bf3fb43
                 case Exiv2::unsignedLong:
bf3fb43
                 case Exiv2::signedShort:
bf3fb43
                 case Exiv2::signedLong:
bf3fb43
-                    return QVariant((int)it->toLong(component));
bf3fb43
+                    if (it->count() > component)
bf3fb43
+                        return QVariant((int)it->toLong(component));
bf3fb43
+                    else
bf3fb43
+                        return QVariant(QVariant::Int);
bf3fb43
                 case Exiv2::unsignedRational:
bf3fb43
                 case Exiv2::signedRational:
bf3fb43
                     if (rationalAsListOfInts)
bf3fb43
                     {
bf3fb43
+                        if (it->count() <= component)
bf3fb43
+                            return QVariant(QVariant::List);
bf3fb43
                         QList<QVariant> list;
bf3fb43
                         list << (*it).toRational(component).first;
bf3fb43
                         list << (*it).toRational(component).second;
bf3fb43
@@ -630,6 +632,8 @@
bf3fb43
                     }
bf3fb43
                     else
bf3fb43
                     {
bf3fb43
+                        if (it->count() <= component)
bf3fb43
+                            return QVariant(QVariant::Double);
bf3fb43
                         // prefer double precision
bf3fb43
                         double num = (*it).toRational(component).first;
bf3fb43
                         double den = (*it).toRational(component).second;
bf3fb43
@@ -743,7 +747,7 @@
6fd9840
                 if (it != exifData.end())
6fd9840
                 {
6fd9840
                     long orientation = it->toLong();
6fd9840
-                    qDebug("Exif Thumbnail Orientation: %i", (int)orientation);
6fd9840
+                    kDebug(51003) << "Exif Thumbnail Orientation: " << (int)orientation << endl;
6fd9840
                     rotateExifQImage(thumbnail, (ImageOrientation)orientation);
6fd9840
                 }
6fd9840
 
bf3fb43
@@ -820,7 +824,7 @@
6fd9840
         thumbFile.setAutoRemove(true);
6fd9840
         thumbFile.open();
6fd9840
         thumb.save(thumbFile.fileName(), "JPEG");
6fd9840
-        qDebug("Thumbnail temp file: %s", thumbFile.fileName().toAscii().data());
6fd9840
+        kDebug(51003) << "Thumbnail temp file: " << thumbFile.fileName().toAscii().data() << endl;
6fd9840
 
6fd9840
         const std::string &fileName((const char*)(QFile::encodeName(thumbFile.fileName())));
6fd9840
 #if (EXIV2_TEST_VERSION(0,17,91))
6fd9840
Index: libkexiv2/kexiv2.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -9,10 +9,6 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
@@ -83,6 +79,25 @@
6fd9840
 
6fd9840
 //-- Statics methods ----------------------------------------------
6fd9840
 
6fd9840
+bool KExiv2::initializeExiv2()
6fd9840
+{
6fd9840
+#ifdef _XMP_SUPPORT_
6fd9840
+    return (Exiv2::XmpParser::initialize());
6fd9840
+#endif // _XMP_SUPPORT_
6fd9840
+
6fd9840
+    return true;
6fd9840
+}
6fd9840
+
6fd9840
+bool KExiv2::cleanupExiv2()
6fd9840
+{
6fd9840
+    // Fix memory leak if Exiv2 support XMP.
6fd9840
+#ifdef _XMP_SUPPORT_
6fd9840
+    Exiv2::XmpParser::terminate();
6fd9840
+#endif // _XMP_SUPPORT_
6fd9840
+
6fd9840
+    return true;
6fd9840
+}
6fd9840
+
6fd9840
 bool KExiv2::supportXmp()
6fd9840
 {
6fd9840
 #ifdef _XMP_SUPPORT_
7de6077
@@ -92,13 +107,46 @@
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
 }
6fd9840
 
6fd9840
-bool KExiv2::supportTiffWritting()
6fd9840
+bool KExiv2::supportMetadataWritting(const QString& typeMime)
6fd9840
 {
6fd9840
+    if (typeMime == QString("image/jpeg"))
6fd9840
+    {
6fd9840
+        return true;
6fd9840
+    }
6fd9840
+    else if (typeMime == QString("image/tiff"))
6fd9840
+    {
6fd9840
 #if (EXIV2_TEST_VERSION(0,17,91))
6fd9840
-    return true;
6fd9840
+        return true;
6fd9840
 #else
6fd9840
+        return false;
6fd9840
+#endif
6fd9840
+    }
6fd9840
+    else if (typeMime == QString("image/png"))
6fd9840
+    {
6fd9840
+#if (EXIV2_TEST_VERSION(0,17,91))
6fd9840
+        return true;
6fd9840
+#else
6fd9840
+        return false;
6fd9840
+#endif
6fd9840
+    }
6fd9840
+    else if (typeMime == QString("image/jp2"))
6fd9840
+    {
6fd9840
+#if (EXIV2_TEST_VERSION(0,17,91))
6fd9840
+        return true;
6fd9840
+#else
6fd9840
+        return false;
6fd9840
+#endif
6fd9840
+    }
7de6077
+    else if (typeMime == QString("image/x-raw"))
7de6077
+    {
7de6077
+#if (EXIV2_TEST_VERSION(0,17,91))
7de6077
+        return true;
7de6077
+#else
7de6077
+        return false;
7de6077
+#endif
7de6077
+    }
6fd9840
+
6fd9840
     return false;
6fd9840
-#endif
6fd9840
 }
6fd9840
 
6fd9840
 QString KExiv2::Exiv2Version()
7de6077
@@ -123,36 +171,77 @@
7de6077
 bool KExiv2::isReadOnly(const QString& filePath)
7de6077
 {
7de6077
     if (!canWriteComment(filePath))
7de6077
-        return false;
7de6077
+        return true;
7de6077
 
7de6077
     if (!canWriteExif(filePath))
7de6077
-        return false;
7de6077
+        return true;
7de6077
 
7de6077
     if (!canWriteIptc(filePath))
7de6077
-        return false;
7de6077
+        return true;
7de6077
 
7de6077
 #ifdef _XMP_SUPPORT_
7de6077
     if (!canWriteXmp(filePath))
7de6077
-        return false;
7de6077
+        return true;
7de6077
 #endif // _XMP_SUPPORT_
7de6077
 
7de6077
-    return true;
7de6077
+    return false;
7de6077
 }
6fd9840
 
6fd9840
 //-- General methods ----------------------------------------------
6fd9840
 
6fd9840
+bool KExiv2::load(const QByteArray& imgData) const
6fd9840
+{
6fd9840
+    if (imgData.isEmpty())
6fd9840
+        return false;
6fd9840
+
6fd9840
+    try
6fd9840
+    {
6fd9840
+        Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((Exiv2::byte*)imgData.data(), imgData.size());
6fd9840
+
6fd9840
+        d->filePath = QString();
6fd9840
+        image->readMetadata();
6fd9840
+
6fd9840
+        // Image comments ---------------------------------
6fd9840
+
6fd9840
+        d->imageComments = image->comment();
6fd9840
+
6fd9840
+        // Exif metadata ----------------------------------
6fd9840
+
6fd9840
+        d->exifMetadata = image->exifData();
6fd9840
+
6fd9840
+        // Iptc metadata ----------------------------------
6fd9840
+
6fd9840
+        d->iptcMetadata = image->iptcData();
6fd9840
+
6fd9840
+#ifdef _XMP_SUPPORT_
6fd9840
+
6fd9840
+        // Xmp metadata -----------------------------------
6fd9840
+
6fd9840
+        d->xmpMetadata = image->xmpData();
6fd9840
+
6fd9840
+#endif // _XMP_SUPPORT_
6fd9840
+
6fd9840
+        return true;
6fd9840
+    }
6fd9840
+    catch( Exiv2::Error &e )
6fd9840
+    {
6fd9840
+        d->printExiv2ExceptionError("Cannot load metadata using Exiv2 ", e);
6fd9840
+    }
6fd9840
+
6fd9840
+    return false;
6fd9840
+}
6fd9840
+
6fd9840
 bool KExiv2::load(const QString& filePath) const
6fd9840
 {
6fd9840
     QFileInfo finfo(filePath);
6fd9840
     if (filePath.isEmpty() || !finfo.isReadable())
6fd9840
     {
6fd9840
-        qDebug("File '%s' is not readable.", finfo.fileName().toAscii().constData());
6fd9840
+        kDebug(51003) << "File '" << finfo.fileName().toAscii().constData() << "' is not readable." << endl;
6fd9840
         return false;
6fd9840
     }
6fd9840
 
6fd9840
     try
6fd9840
     {
6fd9840
-
6fd9840
         Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open((const char*)
6fd9840
                                       (QFile::encodeName(filePath)));
6fd9840
 
7de6077
@@ -199,15 +288,33 @@
6fd9840
     QFileInfo dinfo(finfo.path());
6fd9840
     if (!finfo.isWritable())
6fd9840
     {
6fd9840
-        qDebug("File '%s' is read-only. Metadata not saved.", finfo.fileName().toAscii().constData());
6fd9840
+        kDebug(51003) << "File '" << finfo.fileName().toAscii().constData() << "' is read-only. Metadata not saved." << endl;
6fd9840
         return false;
6fd9840
     }
6fd9840
     if (!dinfo.isWritable())
6fd9840
     {
6fd9840
-        qDebug("Dir '%s' is read-only. Metadata not saved.", dinfo.filePath().toAscii().constData());
6fd9840
+        kDebug(51003) << "Dir '" << dinfo.filePath().toAscii().constData() << "' is read-only. Metadata not saved." << endl;
6fd9840
         return false;
6fd9840
     }
6fd9840
 
6fd9840
+    // TIFF/EP Raw file based supported by Exiv2 0.18 are : DNG, NEF, PEF.
7de6077
+    QString rawTiffBasedSupported("dng nef pef");
6fd9840
+    QString rawTiffBasedNotSupported("3fr arw cr2 dcr erf k25 kdc mos orf raw sr2 srf");
6fd9840
+    if (rawTiffBasedNotSupported.contains(finfo.suffix().toUpper()))
6fd9840
+    {
6fd9840
+        kDebug(51003) << "'" << dinfo.filePath().toAscii().constData() 
6fd9840
+                      << "' is TIFF based RAW file not yet supported. Metadata not saved." << endl;
6fd9840
+        return false;
6fd9840
+    }
6fd9840
+
7de6077
+    if (rawTiffBasedSupported.contains(finfo.suffix().toUpper()) && !d->writeRawFiles)
7de6077
+    {
7de6077
+        kDebug(51003) << "'" << dinfo.filePath().toAscii().constData() 
7de6077
+                      << "' is TIFF based RAW file supported but writing mode is disabled. " 
7de6077
+                      << "Metadata not saved." << endl;
7de6077
+        return false;
7de6077
+    }
7de6077
+
6fd9840
     try
6fd9840
     {
6fd9840
         Exiv2::AccessMode mode;
7de6077
@@ -235,11 +342,12 @@
6fd9840
         {
6fd9840
             if (image->mimeType() == "image/tiff")
6fd9840
             {
6fd9840
+                Exiv2::ExifData exif = image->exifData();
6fd9840
+                QStringList untouchedTags;
6fd9840
+
6fd9840
                 // With tiff image we cannot overwrite whole Exif data as well, because 
6fd9840
                 // image data are stored in Exif container. We need to take a care about
6fd9840
                 // to not lost image data.
6fd9840
-                Exiv2::ExifData exif = image->exifData();
6fd9840
-                QStringList untouchedTags;
6fd9840
                 untouchedTags << "Exif.Image.ImageWidth";
6fd9840
                 untouchedTags << "Exif.Image.ImageLength";
6fd9840
                 untouchedTags << "Exif.Image.BitsPerSample";
7de6077
@@ -331,6 +439,16 @@
7de6077
     return d->filePath;
7de6077
 }
7de6077
 
7de6077
+void KExiv2::setWriteRawFiles(bool on)
7de6077
+{
7de6077
+    d->writeRawFiles = on;
7de6077
+}
7de6077
+
7de6077
+bool KExiv2::writeRawFiles() const
7de6077
+{
7de6077
+    return d->writeRawFiles;
7de6077
+}
7de6077
+
7de6077
 bool KExiv2::setProgramId(bool /*on*/) const
7de6077
 {
7de6077
     return true;
6fd9840
Index: libkexiv2/kexiv2iptc.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2iptc.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2iptc.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,20 +10,16 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
  * either version 2, or (at your option) any later version.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * This program is distributed in the hope that it will be useful,
6fd9840
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
6fd9840
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fd9840
  * GNU General Public License for more details.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * ============================================================ */
6fd9840
 
6fd9840
 // Local includes.
6fd9840
@@ -47,7 +43,8 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         std::string s(e.what());
6fd9840
-        qDebug("%s (Error #%i: %s)", "Cannot check Iptc access mode using Exiv2 ", e.code(), s.c_str());
6fd9840
+        kDebug(51003) << "Cannot check Iptc access mode using Exiv2 (Error #" 
6fd9840
+                      << e.code() << ": " << s.c_str() << ")" << endl;
6fd9840
     }
6fd9840
 
6fd9840
     return false;
6fd9840
@@ -87,7 +84,7 @@
6fd9840
 #if (EXIV2_TEST_VERSION(0,10,0))
6fd9840
                 c2 = Exiv2::Photoshop::setIptcIrb(0, 0, iptc);
6fd9840
 #else
6fd9840
-                qDebug("Exiv2 version is to old. Cannot add Irb header to Iptc metadata");
6fd9840
+                kDebug(51003) << "Exiv2 version is to old. Cannot add Irb header to Iptc metadata" << endl;
6fd9840
                 return QByteArray();
6fd9840
 #endif
6fd9840
             }
6fd9840
@@ -108,7 +105,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
+            kDebug(51003) << "From file " << d->filePath.toAscii().constData() << endl;
6fd9840
 
6fd9840
         d->printExiv2ExceptionError("Cannot get Iptc data using Exiv2 ",e);
6fd9840
     }
6fd9840
@@ -136,7 +133,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
+            kDebug(51003) << "From file " << d->filePath.toAscii().constData() << endl;
6fd9840
 
6fd9840
         d->printExiv2ExceptionError("Cannot set Iptc data using Exiv2 ", e);
6fd9840
     }
6fd9840
@@ -315,7 +312,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Iptc key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(iptcTagName), e);
6fd9840
+                                    .arg(iptcTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
     return QByteArray();
6fd9840
@@ -343,7 +340,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Iptc key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(iptcTagName), e);
6fd9840
+                                    .arg(iptcTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
     return QString();
6fd9840
@@ -397,7 +394,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Iptc key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(iptcTagName), e);
6fd9840
+                                    .arg(iptcTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
     return QStringList();
6fd9840
@@ -415,8 +412,8 @@
6fd9840
         QStringList oldvals = oldValues;
6fd9840
         QStringList newvals = newValues;
6fd9840
 
6fd9840
-        qDebug() << d->filePath.toAscii().constData() << " : " << iptcTagName 
6fd9840
-                 << " => " << newvals.join(",").toAscii().constData() << endl;
6fd9840
+        kDebug(51003) << d->filePath.toAscii().constData() << " : " << iptcTagName 
6fd9840
+                      << " => " << newvals.join(",").toAscii().constData() << endl;
6fd9840
 
6fd9840
         // Remove all old values.
6fd9840
         Exiv2::IptcData iptcData(d->iptcMetadata);
6fd9840
@@ -457,7 +454,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot set Iptc key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(iptcTagName), e);
6fd9840
+                                    .arg(iptcTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
     return false;
6fd9840
@@ -505,7 +502,8 @@
6fd9840
         QStringList oldkeys = oldKeywords;
6fd9840
         QStringList newkeys = newKeywords;
6fd9840
 
6fd9840
-        qDebug("%s ==> Iptc Keywords: %s", d->filePath.toAscii().constData(), newkeys.join(",").toAscii().constData());
6fd9840
+        kDebug(51003) << d->filePath.toAscii().constData() 
6fd9840
+                      << " ==> Iptc Keywords: " << newkeys.join(",").toAscii().constData() << endl;
6fd9840
 
6fd9840
         // Remove all old keywords.
6fd9840
         Exiv2::IptcData iptcData(d->iptcMetadata);
6fd9840
@@ -518,8 +516,7 @@
6fd9840
 
6fd9840
             // Also remove new keywords to avoid duplicates. They will be added again below.
6fd9840
             if ( key == QString("Iptc.Application2.Keywords") &&
6fd9840
-                 (oldKeywords.contains(val) || newKeywords.contains(val))
6fd9840
-               )
6fd9840
+                 (oldKeywords.contains(val) || newKeywords.contains(val)) )
6fd9840
                 it = iptcData.erase(it);
6fd9840
             else 
6fd9840
                 ++it;
6fd9840
Index: libkexiv2/kexiv2private.h
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2private.h	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2private.h	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -41,7 +41,6 @@
6fd9840
 #include <QMatrix>
6fd9840
 #include <QFileInfo>
6fd9840
 #include <QDataStream>
6fd9840
-#include <QDebug>
6fd9840
 
6fd9840
 // KDE includes.
6fd9840
 
6fd9840
@@ -49,6 +48,7 @@
6fd9840
 #include <kencodingdetector.h>
6fd9840
 #include <kstringhandler.h>
6fd9840
 #include <kdeversion.h>
6fd9840
+#include <kdebug.h>
6fd9840
 
6fd9840
 // Exiv2 includes.
6fd9840
 
7de6077
@@ -119,6 +119,8 @@
7de6077
 
7de6077
 public:
7de6077
 
7de6077
+    bool            writeRawFiles;
7de6077
+
7de6077
     QString         filePath;
7de6077
 
7de6077
     std::string     imageComments;
6fd9840
Index: libkexiv2/kexiv2image.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2image.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2image.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,20 +10,16 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
  * either version 2, or (at your option) any later version.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * This program is distributed in the hope that it will be useful,
6fd9840
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
6fd9840
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fd9840
  * GNU General Public License for more details.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * ============================================================ */
6fd9840
 
6fd9840
 // Local includes.
6fd9840
@@ -236,7 +232,7 @@
6fd9840
         if (it != exifData.end())
6fd9840
         {
6fd9840
             orientation = it->toLong();
6fd9840
-            qDebug() << "Orientation => Exif.MinoltaCs7D.Rotation => " << (int)orientation << endl;
6fd9840
+            kDebug(51003) << "Orientation => Exif.MinoltaCs7D.Rotation => " << (int)orientation << endl;
6fd9840
             switch(orientation)
6fd9840
             {
6fd9840
                 case 76:
6fd9840
@@ -255,7 +251,7 @@
6fd9840
         if (it != exifData.end())
6fd9840
         {
6fd9840
             orientation = it->toLong();
6fd9840
-            qDebug() << "Orientation => Exif.MinoltaCs5D.Rotation => " << (int)orientation << endl;
6fd9840
+            kDebug(51003) << "Orientation => Exif.MinoltaCs5D.Rotation => " << (int)orientation << endl;
6fd9840
             switch(orientation)
6fd9840
             {
6fd9840
                 case 76:
6fd9840
@@ -276,7 +272,7 @@
6fd9840
         if (it != exifData.end())
6fd9840
         {
6fd9840
             orientation = it->toLong();
6fd9840
-            qDebug() << "Orientation => Exif.Image.Orientation => " << (int)orientation << endl;
6fd9840
+            kDebug(51003) << "Orientation => Exif.Image.Orientation => " << (int)orientation << endl;
6fd9840
             return (ImageOrientation)orientation;
6fd9840
         }
6fd9840
 
6fd9840
@@ -291,7 +287,7 @@
6fd9840
             orientation = str.toLong(&ok;;
6fd9840
             if (ok)
6fd9840
             {
6fd9840
-                qDebug() << "Orientation => Xmp.tiff.Orientation => " << (int)orientation << endl;
6fd9840
+                kDebug(51003) << "Orientation => Xmp.tiff.Orientation => " << (int)orientation << endl;
6fd9840
                 return (ImageOrientation)orientation;
6fd9840
             }
6fd9840
         }
6fd9840
@@ -316,14 +312,14 @@
6fd9840
     {
6fd9840
         if (orientation < ORIENTATION_UNSPECIFIED || orientation > ORIENTATION_ROT_270)
6fd9840
         {
6fd9840
-            qDebug("Image orientation value is not correct!");
6fd9840
+            kDebug(51003) << "Image orientation value is not correct!" << endl;
6fd9840
             return false;
6fd9840
         }
6fd9840
 
6fd9840
         // Set Exif values.
6fd9840
 
6fd9840
         d->exifMetadata["Exif.Image.Orientation"] = static_cast<uint16_t>(orientation);
6fd9840
-        qDebug() << "Exif.Image.Orientation tag set to: " << (int)orientation;
6fd9840
+        kDebug(51003) << "Exif.Image.Orientation tag set to: " << (int)orientation << endl;
6fd9840
 
6fd9840
         // Set Xmp values.
6fd9840
 
6fd9840
@@ -345,7 +341,7 @@
6fd9840
         if (it != d->exifMetadata.end())
6fd9840
         {
6fd9840
             d->exifMetadata.erase(it);
6fd9840
-            qDebug("Removing Exif.MinoltaCs7D.Rotation tag");
6fd9840
+            kDebug(51003) << "Removing Exif.MinoltaCs7D.Rotation tag" << endl;
6fd9840
         }
6fd9840
 
6fd9840
         Exiv2::ExifKey minoltaKey2("Exif.MinoltaCs5D.Rotation");
6fd9840
@@ -353,7 +349,7 @@
6fd9840
         if (it != d->exifMetadata.end())
6fd9840
         {
6fd9840
             d->exifMetadata.erase(it);
6fd9840
-            qDebug("Removing Exif.MinoltaCs5D.Rotation tag");
6fd9840
+            kDebug(51003) << "Removing Exif.MinoltaCs5D.Rotation tag" << endl;
6fd9840
         }
6fd9840
 
6fd9840
         return true;
6fd9840
@@ -485,7 +481,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Exif.Photo.DateTimeOriginal => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Exif.Photo.DateTimeOriginal => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -498,7 +494,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Exif.Photo.DateTimeDigitized => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Exif.Photo.DateTimeDigitized => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -511,7 +507,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Exif.Image.DateTime => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Exif.Image.DateTime => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -533,7 +529,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.exif.DateTimeOriginal => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.exif.DateTimeOriginal => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -546,7 +542,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.exif.DateTimeDigitized => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.exif.DateTimeDigitized => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -559,7 +555,7 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.photoshop.DateCreated => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.photoshop.DateCreated => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -572,10 +568,10 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.xmp.CreateDate => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.xmp.CreateDate => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
-                }  
6fd9840
+                }
6fd9840
             }
6fd9840
             {
6fd9840
                 Exiv2::XmpKey key("Xmp.tiff.DateTime");
6fd9840
@@ -585,10 +581,10 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.tiff.DateTime => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.tiff.DateTime => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
-                }  
6fd9840
+                }
6fd9840
             }
6fd9840
             {
6fd9840
                 Exiv2::XmpKey key("Xmp.xmp.ModifyDate");
6fd9840
@@ -598,10 +594,10 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.xmp.ModifyDate => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.xmp.ModifyDate => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
-                }  
6fd9840
+                }
6fd9840
             }
6fd9840
             {
6fd9840
                 Exiv2::XmpKey key("Xmp.xmp.MetadataDate");
6fd9840
@@ -611,10 +607,10 @@
6fd9840
                     QDateTime dateTime = QDateTime::fromString(it->toString().c_str(), Qt::ISODate);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Xmp.xmp.MetadataDate => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Xmp.xmp.MetadataDate => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
-                }  
6fd9840
+                }
6fd9840
             }
6fd9840
         }
6fd9840
 
6fd9840
@@ -643,7 +639,7 @@
6fd9840
                     QDateTime dateTime = QDateTime(date, time);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Iptc.Application2.DateCreated => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Iptc.Application2.DateCreated => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -666,7 +662,7 @@
6fd9840
                     QDateTime dateTime = QDateTime(date, time);
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        qDebug() << "DateTime => Iptc.Application2.DigitizationDate => " << dateTime << endl;
6fd9840
+                        kDebug(51003) << "DateTime => Iptc.Application2.DigitizationDate => " << dateTime << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -708,7 +704,7 @@
6fd9840
 
6fd9840
         // In second we write date & time into Xmp.
6fd9840
 
6fd9840
-        const std::string &xmpdatetime(dateTime.toString(QString("yyyy:MM:dd hh:mm:ss")).toAscii().constData());
6fd9840
+        const std::string &xmpdatetime(dateTime.toString(Qt::ISODate).toAscii().constData());
6fd9840
 
6fd9840
         Exiv2::Value::AutoPtr xmpTxtVal = Exiv2::Value::create(Exiv2::xmpText);
6fd9840
         xmpTxtVal->read(xmpdatetime);
6fd9840
@@ -769,7 +765,7 @@
6fd9840
 
6fd9840
                 if (dateTime.isValid())
6fd9840
                 {
6fd9840
-                    // qDebug("DateTime (Exif digitalized): %s", dateTime.toString().toAscii().constData());
6fd9840
+                    kDebug(51003) << "DateTime (Exif digitalized): " << dateTime.toString().toAscii().constData() << endl;
6fd9840
                     return dateTime;
6fd9840
                 }
6fd9840
             }
6fd9840
@@ -804,7 +800,7 @@
6fd9840
 
6fd9840
                     if (dateTime.isValid())
6fd9840
                     {
6fd9840
-                        //qDebug("Date (IPTC digitalized): %s", dateTime.toString().toAscii().constData());
6fd9840
+                        kDebug(51003) << "Date (IPTC digitalized): " << dateTime.toString().toAscii().constData() << endl;
6fd9840
                         return dateTime;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -857,9 +853,8 @@
6fd9840
 
6fd9840
         // A little bit compressed preview jpeg image to limit IPTC size.
6fd9840
         preview.save(previewFile.fileName(), "JPEG");
6fd9840
-        qDebug("JPEG image preview size: (%i x %i) pixels - %i bytes", 
6fd9840
-               preview.width(), preview.height(), 
6fd9840
-               (int)previewFile.size());
6fd9840
+        kDebug(51003) << "JPEG image preview size: (" << preview.width() << " x " 
6fd9840
+                      << preview.height() << ") pixels - " << (int)previewFile.size() << " bytes" << endl;
6fd9840
 
6fd9840
         QByteArray data;
6fd9840
         data.resize(previewFile.size());
6fd9840
Index: libkexiv2/CMakeLists.txt
6fd9840
===================================================================
7de6077
--- libkexiv2/CMakeLists.txt	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/CMakeLists.txt	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -1,7 +1,9 @@
6fd9840
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
6fd9840
 
6fd9840
 INCLUDE_DIRECTORIES(${EXIV2_INCLUDE_DIR})
6fd9840
 
6fd9840
+ADD_DEFINITIONS(${EXIV2_DEFINITIONS})
6fd9840
+ADD_DEFINITIONS(${KDE4_ENABLE_EXCEPTIONS})
6fd9840
+
6fd9840
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/version.h)
6fd9840
 
6fd9840
 # This was used to enable catching of exceptions thrown by libexiv2.
6fd9840
@@ -20,7 +22,7 @@
6fd9840
 
6fd9840
 KDE4_ADD_LIBRARY(kexiv2 SHARED ${kexiv2_LIB_SRCS})
6fd9840
 
6fd9840
-TARGET_LINK_LIBRARIES(kexiv2 ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} exiv2)
6fd9840
+TARGET_LINK_LIBRARIES(kexiv2 ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY} ${EXIV2_LIBRARIES})
6fd9840
 
6fd9840
 IF( WIN32 )
6fd9840
 TARGET_LINK_LIBRARIES( kexiv2 ${EXPAT_LIBRARIES} )
6fd9840
Index: libkexiv2/kexiv2.h
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2.h	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2.h	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -118,13 +118,27 @@
6fd9840
     //-- STATICS methods ----------------------------------------------
6fd9840
     //-----------------------------------------------------------------
6fd9840
 
6fd9840
+    /** Return true if Exiv2 library initialization is done properlly.
6fd9840
+        This method must be call before to use multithreading with libkexiv2.
6fd9840
+        It initialize several non re-entrancy code from Adobe XMP SDK 
6fd9840
+        See B.K.O #166424 for details.
6fd9840
+     */
6fd9840
+    static bool initializeExiv2();
6fd9840
+
6fd9840
+    /** Return true if Exiv2 library memory allocations are cleaned properlly.
6fd9840
+        This method must be call after to use multithreading with libkexiv2.
6fd9840
+        It cleanup memory used by Adobe XMP SDK 
6fd9840
+        See B.K.O #166424 for details.
6fd9840
+     */
6fd9840
+    static bool cleanupExiv2();
6fd9840
+
6fd9840
     /** Return true if library can handle Xmp metadata
6fd9840
      */
6fd9840
     static bool supportXmp();
6fd9840
 
6fd9840
-    /** Return true if library can writte metadata to TIFF/DNG files
6fd9840
+    /** Return true if library can writte metadata to typeMime file format.
6fd9840
      */
6fd9840
-    static bool supportTiffWritting();
6fd9840
+    static bool supportMetadataWritting(const QString& typeMime);
6fd9840
 
6fd9840
     /** Return a string version of Exiv2 release in format "major.minor.patch"
6fd9840
      */
7de6077
@@ -135,13 +149,20 @@
7de6077
     static QString version();
7de6077
 
7de6077
     /** return true if metadata from file cannot be written by Exiv2.
7de6077
+        This method is obosolete and will be removed.
7de6077
+        Use canWriteComment(), canWriteExif(), canWriteIptc(), or canWriteXmp() instead.
7de6077
      */
7de6077
-    static bool isReadOnly(const QString& filePath);
7de6077
+    KDE_DEPRECATED static bool isReadOnly(const QString& filePath);
7de6077
 
7de6077
     //-----------------------------------------------------------------
6fd9840
     //-- GENERAL methods ----------------------------------------------
6fd9840
     //-----------------------------------------------------------------
6fd9840
 
6fd9840
+    /** Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a byte array. 
6fd9840
+        Return true if metadata have been loaded successfully from image data.
6fd9840
+     */
6fd9840
+    bool load(const QByteArray& imgData) const;
6fd9840
+
6fd9840
     /** Load all metadata (Exif, Iptc, Xmp, and JFIF Comments) from a picture (JPEG, RAW, TIFF, PNG,
6fd9840
         DNG, etc...). Return true if metadata have been loaded successfully from file.
6fd9840
      */
7de6077
@@ -169,6 +190,16 @@
7de6077
      */
7de6077
     QString getFilePath() const;
7de6077
 
7de6077
+    /** Enable or disable writing metadata operations to RAW tiff based files.
7de6077
+        It's require Exiv2 0.18. By default RAW files are untouched.
7de6077
+     */
7de6077
+    void setWriteRawFiles(bool on);
7de6077
+
7de6077
+    /** Return true if writing metadata operations on RAW tiff based files is enabled.
7de6077
+        It's require Exiv2 0.18.
7de6077
+     */
7de6077
+    bool writeRawFiles() const;
7de6077
+
7de6077
     //-------------------------------------------------------------------
7de6077
     //-- Metadata IMAGE INFORMATION manipulation methods ----------------
7de6077
     //-------------------------------------------------------------------
6fd9840
Index: libkexiv2/kexiv2xmp.cpp
6fd9840
===================================================================
7de6077
--- libkexiv2/kexiv2xmp.cpp	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ libkexiv2/kexiv2xmp.cpp	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -10,20 +10,16 @@
6fd9840
  * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
6fd9840
  * Copyright (C) 2006-2008 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
6fd9840
  *
6fd9840
- * NOTE: Do not use kdDebug() in this implementation because 
6fd9840
- *       it will be multithreaded. Use qDebug() instead. 
6fd9840
- *       See B.K.O #133026 for details.
6fd9840
- *
6fd9840
  * This program is free software; you can redistribute it
6fd9840
  * and/or modify it under the terms of the GNU General
6fd9840
  * Public License as published by the Free Software Foundation;
6fd9840
  * either version 2, or (at your option) any later version.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * This program is distributed in the hope that it will be useful,
6fd9840
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
6fd9840
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6fd9840
  * GNU General Public License for more details.
6fd9840
- * 
6fd9840
+ *
6fd9840
  * ============================================================ */
6fd9840
 
6fd9840
 // Local includes.
6fd9840
@@ -48,7 +44,8 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         std::string s(e.what());
6fd9840
-        qDebug("%s (Error #%i: %s)", "Cannot check Xmp access mode using Exiv2 ", e.code(), s.c_str());
6fd9840
+        kDebug(51003) << "Cannot check Xmp access mode using Exiv2 (Error #" 
6fd9840
+                      << e.code() << ": " << s.c_str() << ")" << endl;
6fd9840
     }
6fd9840
 
6fd9840
     return false;
6fd9840
@@ -110,8 +107,8 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
 
6fd9840
+
6fd9840
         d->printExiv2ExceptionError("Cannot get Xmp data using Exiv2 ", e);
6fd9840
     }
6fd9840
 
6fd9840
@@ -140,7 +137,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         if (!d->filePath.isEmpty())
6fd9840
-            qDebug ("From file %s", d->filePath.toAscii().constData());
6fd9840
+            kDebug(51003) << "From file " << d->filePath.toAscii().constData() << endl;
6fd9840
 
6fd9840
         d->printExiv2ExceptionError("Cannot set Xmp data using Exiv2 ", e);
6fd9840
     }
6fd9840
@@ -299,7 +296,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
@@ -355,7 +352,7 @@
6fd9840
                     QString text = QString::fromUtf8(it2->second.c_str());
6fd9840
                     if (escapeCR)
6fd9840
                         text.replace("\n", " ");
6fd9840
-        
6fd9840
+
6fd9840
                     map.insert(lang, text);
6fd9840
                 }
6fd9840
 
6fd9840
@@ -366,7 +363,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
@@ -388,7 +385,7 @@
6fd9840
         removeXmpTag(xmpTagName);
6fd9840
 
6fd9840
         Exiv2::Value::AutoPtr xmpTxtVal = Exiv2::Value::create(Exiv2::langAlt);
6fd9840
-        
6fd9840
+
6fd9840
         for (AltLangMap::const_iterator it = values.begin(); it != values.end(); ++it)
6fd9840
         {
6fd9840
             QString lang = it.key();  
6fd9840
@@ -435,7 +432,7 @@
6fd9840
                     {
6fd9840
                         if (escapeCR)
6fd9840
                             tagValue.replace("\n", " ");
6fd9840
-            
6fd9840
+
6fd9840
                         return tagValue;
6fd9840
                     }
6fd9840
                 }
6fd9840
@@ -445,7 +442,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
@@ -484,7 +481,7 @@
6fd9840
                 {
6fd9840
                     const std::string &val((*it).toUtf8().constData());
6fd9840
                     xmpTxtVal->read(val);
6fd9840
-                    qDebug() << *it << endl;
6fd9840
+                    kDebug(51003) << *it << endl;
6fd9840
                 }
6fd9840
             }
6fd9840
         }
6fd9840
@@ -524,13 +521,13 @@
6fd9840
                     std::ostringstream os;
6fd9840
                     os << it->toString(i);
6fd9840
                     QString seqValue = QString::fromUtf8(os.str().c_str());
6fd9840
-    
6fd9840
+
6fd9840
                     if (escapeCR)
6fd9840
                         seqValue.replace("\n", " ");
6fd9840
 
6fd9840
                     seq.append(seqValue);
6fd9840
                 }
6fd9840
-                qDebug() << "XMP String Seq (" << xmpTagName << "): " << seq << endl;  
6fd9840
+                kDebug(51003) << "XMP String Seq (" << xmpTagName << "): " << seq << endl;
6fd9840
 
6fd9840
                 return seq;
6fd9840
             }
6fd9840
@@ -539,7 +536,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
7de6077
@@ -557,10 +554,10 @@
7de6077
 
7de6077
     try
7de6077
     {
7de6077
-        QStringList list = seq;
7de6077
+        const QStringList list = seq;
6fd9840
         Exiv2::Value::AutoPtr xmpTxtSeq = Exiv2::Value::create(Exiv2::xmpSeq);
6fd9840
 
6fd9840
-        for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
7de6077
+        for (QStringList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
6fd9840
         {
6fd9840
             const std::string &txt((*it).toUtf8().constData());
6fd9840
             xmpTxtSeq->read(txt);
6fd9840
@@ -598,7 +595,7 @@
6fd9840
                     std::ostringstream os;
6fd9840
                     os << it->toString(i);
6fd9840
                     QString bagValue = QString::fromUtf8(os.str().c_str());
6fd9840
-    
6fd9840
+
6fd9840
                     if (escapeCR)
6fd9840
                         bagValue.replace("\n", " ");
6fd9840
 
6fd9840
@@ -612,7 +609,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
@@ -633,7 +630,7 @@
6fd9840
         QStringList list = bag;
6fd9840
         Exiv2::Value::AutoPtr xmpTxtBag = Exiv2::Value::create(Exiv2::xmpBag);
6fd9840
 
6fd9840
-        for (QStringList::Iterator it = list.begin(); it != list.end(); ++it )
7de6077
+        for (QStringList::const_iterator it = list.constBegin(); it != list.constEnd(); ++it )
6fd9840
         {
6fd9840
             const std::string &txt((*it).toUtf8().constData());
6fd9840
             xmpTxtBag->read(txt);
6fd9840
@@ -748,7 +745,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError(QString("Cannot find Xmp key '%1' into image using Exiv2 ")
6fd9840
-                                 .arg(xmpTagName), e);
6fd9840
+                                    .arg(xmpTagName), e);
6fd9840
     }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
@@ -797,7 +794,7 @@
6fd9840
     catch( Exiv2::Error &e )
6fd9840
     {
6fd9840
         d->printExiv2ExceptionError("Cannot remove Xmp tag using Exiv2 ", e);
6fd9840
-    }        
6fd9840
+    }
6fd9840
 
6fd9840
 #endif // _XMP_SUPPORT_
6fd9840
 
6fd9840
@@ -818,9 +815,9 @@
6fd9840
 
6fd9840
     QStringList oldkeys = getXmpKeywords();
6fd9840
     QStringList newkeys = newKeywords;
6fd9840
-    
6fd9840
+
6fd9840
     // Create a list of keywords including old one witch already exists.
6fd9840
-    for (QStringList::Iterator it = oldkeys.begin(); it != oldkeys.end(); ++it )
7de6077
+    for (QStringList::const_iterator it = oldkeys.constBegin(); it != oldkeys.constEnd(); ++it )
6fd9840
     {
6fd9840
         if (!newkeys.contains(*it))
6fd9840
             newkeys.append(*it);
7de6077
@@ -846,11 +843,11 @@
7de6077
     if (!setProgramId(setProgramName))
7de6077
         return false;
6fd9840
 
7de6077
-    QStringList oldSubCat = getXmpSubCategories();
7de6077
+    const QStringList oldSubCat = getXmpSubCategories();
6fd9840
     QStringList newSubCat = newSubCategories;
6fd9840
-    
6fd9840
+
6fd9840
     // Create a list of sub-categories including old one witch already exists.
6fd9840
-    for (QStringList::Iterator it = oldSubCat.begin(); it != oldSubCat.end(); ++it )
7de6077
+    for (QStringList::const_iterator it = oldSubCat.constBegin(); it != oldSubCat.constEnd(); ++it )
6fd9840
     {
6fd9840
         if (!newSubCat.contains(*it))
6fd9840
             newSubCat.append(*it);
6fd9840
@@ -878,9 +875,9 @@
6fd9840
 
6fd9840
     QStringList oldSubjectCodes = getXmpSubjects();
6fd9840
     QStringList newSubjectCodes = newSubjects;
6fd9840
-    
6fd9840
+
6fd9840
     // Create a list of sub-categories including old one witch already exists.
6fd9840
-    for (QStringList::Iterator it = oldSubjectCodes.begin(); it != oldSubjectCodes.end(); ++it )
7de6077
+    for (QStringList::const_iterator it = oldSubjectCodes.constBegin(); it != oldSubjectCodes.constEnd(); ++it )
6fd9840
     {
6fd9840
         if (!newSubjectCodes.contains(*it))
6fd9840
             newSubjectCodes.append(*it);
6fd9840
Index: TODO
6fd9840
===================================================================
7de6077
--- TODO	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ TODO	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -1,3 +1,3 @@
6fd9840
 - Extract GPS info from XMP tags.
6fd9840
-- Exif/Iptc => Xmp synchrosization.
6fd9840
+- Exif/Iptc => Xmp synchronization.
6fd9840
 - Xmp side-car file support.
6fd9840
Index: NEWS
6fd9840
===================================================================
7de6077
--- NEWS	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ NEWS	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
6fd9840
@@ -1,9 +1,27 @@
6fd9840
-0.2.0
6fd9840
+0.4.0 - 
6fd9840
+
6fd9840
+- Use kDebug(51003) instead qDebug()
6fd9840
+
6fd9840
+0.3.0 - Released with KDE 4.1.2
6fd9840
 ------------------------------------------------------------------------
6fd9840
+
6fd9840
+- API changed: Added 2 new static methods to init and clear non re-entrant Adobe XMP 
6fd9840
+               SDK code from Exiv2 core. This code must be called before and after 
6fd9840
+               all multithreaded operations with KExiv2.
6fd9840
+               * initializeExiv2().        
6fd9840
+               * cleanupExiv2().       
6fd9840
+               Added a new method to load image data from a byte array.
6fd9840
+
6fd9840
+Bugs fixed from B.K.O (http://bugs.kde.org):
6fd9840
+001 ==> 166424: Crash when editing Caption with Digikam4 SVN.
6fd9840
+
6fd9840
+0.2.0 - Released with KDE 4.1.0
6fd9840
+------------------------------------------------------------------------
6fd9840
 Port to CMake/KDE4/QT4
6fd9840
 Support of XMP metadata (require Exiv2 0.16)
6fd9840
 Split methods to separate files to provide a more readable implementation.
6fd9840
 New method to fix orientation of a QImage accordingly with Exif orientation tag.
6fd9840
+Moved from extragear/libs to kdegraphics/libs
6fd9840
 
6fd9840
 Bugs fixed from B.K.O (http://bugs.kde.org):
6fd9840
 001 ==> 146864: Lesser XMP support in digiKam.
6fd9840
Index: CMakeLists.txt
6fd9840
===================================================================
7de6077
--- CMakeLists.txt	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ CMakeLists.txt	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
@@ -15,11 +15,14 @@
6fd9840
 # 0.1.7 => 4.0.1
6fd9840
 # 0.1.8 => 5.0.0
6fd9840
 # ... here we can have new releases from KDE3 branch
6fd9840
-# 0.2.0 => 6.0.0
6fd9840
+# 0.2.0 => 6.0.0     (released with KDE 4.1.0)
6fd9840
+# 0.3.0 => 7.0.0     (released with KDE 4.1.2)
6fd9840
+# 0.4.0 => 7.1.0
7de6077
+# 0.5.0 => 7.2.0     (Released with KDE 4.2.0)
6fd9840
 
6fd9840
 # Library API version
6fd9840
 SET(KEXIV2_LIB_MAJOR_VERSION "0")
6fd9840
-SET(KEXIV2_LIB_MINOR_VERSION "2")
7de6077
+SET(KEXIV2_LIB_MINOR_VERSION "5")
6fd9840
 SET(KEXIV2_LIB_PATCH_VERSION "0")
6fd9840
 
6fd9840
 # Suffix to add at end of version string. Usual values are:
7de6077
@@ -29,12 +32,12 @@
6fd9840
 # "-beta3" : beta3 release.
6fd9840
 # "-rc"    : release candidate.
6fd9840
 # ""       : final relase. Can be used in production.
6fd9840
-SET(KEXIV2_LIB_SUFFIX_VERSION "-svn")
6fd9840
+SET(KEXIV2_LIB_SUFFIX_VERSION "")
6fd9840
 
6fd9840
 # Library ABI version used by linker.
6fd9840
 # For details : http://www.gnu.org/software/libtool/manual.html#Updating-version-info
6fd9840
-SET(KEXIV2_LIB_SO_CUR_VERSION "6")
6fd9840
-SET(KEXIV2_LIB_SO_REV_VERSION "0")
6fd9840
+SET(KEXIV2_LIB_SO_CUR_VERSION "7")
7de6077
+SET(KEXIV2_LIB_SO_REV_VERSION "2")
6fd9840
 SET(KEXIV2_LIB_SO_AGE_VERSION "0")
6fd9840
 
6fd9840
 # =======================================================
7de6077
@@ -47,7 +50,6 @@
7de6077
 
7de6077
 # =======================================================
7de6077
 
7de6077
-
7de6077
 if (EXIV2_FOUND)
7de6077
   SUBDIRS(libkexiv2)
7de6077
 
6fd9840
Index: README
6fd9840
===================================================================
7de6077
--- README	(.../tags/KDE/4.1.3/kdegraphics/libs/libkexiv2)	(revision 888944)
7de6077
+++ README	(.../trunk/KDE/kdegraphics/libs/libkexiv2)	(revision 888944)
bf3fb43
@@ -9,18 +9,20 @@
bf3fb43
 -- ABOUT --------------------------------------------------------------
bf3fb43
 
bf3fb43
 Libkexiv2 is a wrapper around Exiv2 library to manipulate pictures 
bf3fb43
-metadata as EXIF/IPTC and XMP.
bf3fb43
+metadata as EXIF/IPTC and XMP. Metadata interface follow this paper:
bf3fb43
 
bf3fb43
+http://www.metadataworkinggroup.com/pdf/mwg_guidance.pdf
bf3fb43
+
bf3fb43
 This library is used by kipi-plugins, digiKam and others kipi host programs.
bf3fb43
 
bf3fb43
 The library documentation is available on header files.
6fd9840
 
6fd9840
 -- DEPENDENCIES -------------------------------------------------------
6fd9840
 
6fd9840
-CMake      >= 2.4.x                     http://www.cmake.org
6fd9840
-libqt      >= 4.2.x                     http://www.trolltech.com
6fd9840
-libkde     >= 4.0.x                     http://www.kde.org
6fd9840
-libexiv2   >= 0.12  (0.17 recommended)  http://www.exiv2.org
6fd9840
+CMake      >= 2.4.x                    http://www.cmake.org
6fd9840
+libqt      >= 4.2.x                    http://www.trolltech.com
6fd9840
+libkde     >= 4.0.x                    http://www.kde.org
6fd9840
+libexiv2   >= 0.13  (0.18 recommended) http://www.exiv2.org
6fd9840
 
6fd9840
 Note: Exiv2 >= 0.16 is require to handle XMP metadata.
6fd9840
 
bf3fb43
@@ -61,7 +63,7 @@
bf3fb43
 
bf3fb43
 IMPORTANT : the bugreports and wishlist are hosted by the KDE bugs report 
bf3fb43
 system who can be contacted by the standard Kde help menu of plugins dialog. 
bf3fb43
-A mail will be automaticly sent to the Kipi mailing list.
bf3fb43
+A mail will be automatically sent to the Kipi mailing list.
bf3fb43
 There is no need to contact directly the Kipi mailing list for a bug report 
bf3fb43
 or a devel wish.
bf3fb43