[Digikam-devel] extragear/graphics/digikam

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Digikam-devel] extragear/graphics/digikam

Gilles Caulier
SVN commit 523453 by cgilles:

digikam from trunk : kipiInterface use DMetadata (Exiv2) instead libKexif to get Exif orientation tag.
CCMAIL: [hidden email]

 M  +0 -1      TODO  
 M  +1 -0      digikam/Makefile.am  
 M  +13 -20    digikam/kipiinterface.cpp  
 M  +1 -1      digikam/kipiinterface.h  


--- trunk/extragear/graphics/digikam/TODO #523452:523453
@@ -20,7 +20,6 @@
     
 * Using Exiv2 instead libKExif :
    - albumiconview.cpp    lines 1296 and 1298.
-   - kipiinterface.cpp    line 216.
    - editorwindow.cpp     lines 1166 and 1215.
    - jpegmetadata.cpp     line 143.
    - exifrotate.cpp       lines 74 and 210.
--- trunk/extragear/graphics/digikam/digikam/Makefile.am #523452:523453
@@ -13,6 +13,7 @@
    -I$(top_srcdir)/digikam/libs/jpegutils \
    -I$(top_srcdir)/digikam/libs/dcraw \
    -I$(top_srcdir)/digikam/libs/dimg \
+       -I$(top_srcdir)/digikam/libs/dmetadata \
    -I$(top_srcdir)/digikam/libs/imageproperties \
    -I$(top_srcdir)/digikam/libs/threadimageio \
    -I$(top_srcdir)/digikam/utilities/cameragui \
--- trunk/extragear/graphics/digikam/digikam/kipiinterface.cpp #523452:523453
@@ -3,7 +3,7 @@
  *          Ralf Holzer <ralf at well.com>
  *          Renchi Raju <[hidden email]>
  * Date   : 2004-08-02
- * Description :
+ * Description : digiKam kipi library interface.
  *
  * Copyright 2004-2006 by Gilles Caulier
  *
@@ -48,11 +48,6 @@
 #include <kio/netaccess.h>
 #include <kdebug.h>
 
-// LibKEXIF includes.
-
-#include <libkexif/kexifutils.h>
-#include <libkexif/kexifdata.h>
-
 // Local includes.
 
 #include "albummanager.h"
@@ -60,6 +55,7 @@
 #include "album.h"
 #include "albumdb.h"
 #include "albumsettings.h"
+#include "dmetadata.h"
 #include "kipiinterface.h"
 
 namespace Digikam
@@ -69,8 +65,8 @@
 /////////////////////////////// IMAGE INFO IMPLEMENTATION CLASS ////////////////////////////////////////
 
 DigikamImageInfo::DigikamImageInfo( KIPI::Interface* interface, const KURL& url )
-    : KIPI::ImageInfoShared( interface, url ),
-      palbum_(0)
+                : KIPI::ImageInfoShared( interface, url ),
+                  palbum_(0)
 {
 }
 
@@ -213,24 +209,21 @@
     AlbumSettings *settings = AlbumSettings::instance();
     if (settings->getExifRotate())
     {
-        KExifData exifData;
+        DMetadata metadata(_url.path());
+        DMetadata::ImageOrientation orientation = metadata.getExifImageOrientation();
         
-        if (exifData.readFromFile(_url.path()))
+        switch (orientation)
         {
-            KExifData::ImageOrientation orientation = exifData.getImageOrientation();
-
-            switch (orientation) {
-            case KExifData::ROT_180:
+            case DMetadata::ORIENTATION_ROT_180:
                 return 180;
-            case KExifData::ROT_90:
-            case KExifData::ROT_90_HFLIP:
-            case KExifData::ROT_90_VFLIP:
+            case DMetadata::ORIENTATION_ROT_90:
+            case DMetadata::ORIENTATION_ROT_90_HFLIP:
+            case DMetadata::ORIENTATION_ROT_90_VFLIP:
                 return 90;
-            case KExifData::ROT_270:
+            case DMetadata::ORIENTATION_ROT_270:
                 return 270;
             default:
                 return 0;
-            }
         }
     }
     
@@ -239,7 +232,7 @@
 
 void DigikamImageInfo::setAngle( int )
 {
-    // TODO ! This will a libKExif implementation call ?
+    // TODO : add here a Digikam::DMetadata call (thru Exiv2) to set Exif orientation tag.
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////////////////////
--- trunk/extragear/graphics/digikam/digikam/kipiinterface.h #523452:523453
@@ -3,7 +3,7 @@
  *          Ralf Holzer <ralf at well.com>
  *          Renchi Raju <[hidden email]>
  * Date   : 2004-08-02
- * Description :
+ * Description : digiKam kipi library interface.
  *
  * Copyright 2004-2006 by Gilles Caulier
  *
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel