[Digikam-devel] extragear/graphics/digikam

Gilles Caulier caulier.gilles at free.fr
Tue Mar 28 18:06:01 BST 2006


SVN commit 523636 by cgilles:

digikam from trunk : Camera gui Exif auto-rotation use DMetadata (Exiv2) instead libKexif.

CCMAIL: digikam-devel at kde.org

 M  +0 -1      TODO  
 M  +32 -12    kioslave/Makefile.am  
 M  +6 -2      libs/jpegutils/Makefile.am  
 M  +19 -21    libs/jpegutils/exifrotate.cpp  
 M  +5 -3      libs/jpegutils/exifrotate.h  


--- trunk/extragear/graphics/digikam/TODO #523635:523636
@@ -20,7 +20,6 @@
      
 * Using Exiv2 instead libKExif :
    - jpegmetadata.cpp     line 143.
-   - exifrotate.cpp       lines 74 and 210.
       
 * post conversion to qlistview: allow selection of multiple
   albums/tags/dates :
--- trunk/extragear/graphics/digikam/kioslave/Makefile.am #523635:523636
@@ -1,42 +1,62 @@
 METASOURCES = AUTO  
 
 INCLUDES    = -I$(top_srcdir)/digikam/libs/jpegutils \
-	          -I$(top_srcdir)/digikam/libs/dimg \
+	      -I$(top_srcdir)/digikam/libs/dimg \
               -I$(top_srcdir)/digikam/libs/dmetadata \
-	          -I$(top_srcdir)/digikam/libs/dcraw \
-	          -I$(top_srcdir)/digikam/digikam \
-	          $(all_includes)
+	      -I$(top_srcdir)/digikam/libs/dcraw \
+	      -I$(top_srcdir)/digikam/digikam \
+	      $(all_includes)
 
 kde_module_LTLIBRARIES = kio_digikamthumbnail.la kio_digikamtags.la \
 			 kio_digikamalbums.la kio_digikamdates.la \
 			 kio_digikamsearch.la
 
+protocol_DATA = digikamthumbnail.protocol digikamtags.protocol \
+		digikamalbums.protocol digikamdates.protocol \
+		digikamsearch.protocol
+
+protocoldir = $(kde_servicesdir)
+
+# -- digikam KIO image thumbnails generator ----------------------------------------
+
 kio_digikamthumbnail_la_SOURCES = digikamthumbnail.cpp 
 
 kio_digikamthumbnail_la_LIBADD  = $(LIB_KIO) $(LIBJPEG) $(LIBPNG) $(LIB_EXIV2) \
-	                              $(top_builddir)/digikam/libs/dimg/libdimg.la 
+	                          $(top_builddir)/digikam/libs/dimg/libdimg.la 
 
 kio_digikamthumbnail_la_LDFLAGS = -module -avoid-version $(KDE_PLUGIN) $(all_libraries)	                          
 
+# -- digikam tags KIO --------------------------------------------------------------
+
 kio_digikamtags_la_SOURCES = digikamtags.cpp sqlitedb.cpp
+
 kio_digikamtags_la_LIBADD  = $(LIB_KIO)  $(LIB_SQLITE3)
+
 kio_digikamtags_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) 
 
+# -- digikam albums KIO ------------------------------------------------------------
+
 kio_digikamalbums_la_SOURCES = digikamalbums.cpp sqlitedb.cpp
+
 kio_digikamalbums_la_LIBADD  = $(top_builddir)/digikam/libs/jpegutils/libjpegutils.la \
-			                   $(LIB_KIO) $(LIB_SQLITE3)
+			       $(LIB_KIO) $(LIB_SQLITE3) $(LIB_EXIV2) \
+	                       $(top_builddir)/digikam/libs/dmetadata/libdmetadata.la \
+	                       $(top_builddir)/digikam/libs/dcraw/libdcraw.la 
+
 kio_digikamalbums_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) 
 
+# -- digikam dates KIO -------------------------------------------------------------
+
 kio_digikamdates_la_SOURCES = digikamdates.cpp sqlitedb.cpp
+
 kio_digikamdates_la_LIBADD  = $(LIB_KIO) $(LIB_SQLITE3)
+
 kio_digikamdates_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) 
 
+# -- digikam search KIO ------------------------------------------------------------
+
 kio_digikamsearch_la_SOURCES = digikamsearch.cpp sqlitedb.cpp
+
 kio_digikamsearch_la_LIBADD  = $(LIB_KIO) $(LIB_SQLITE3)
+
 kio_digikamsearch_la_LDFLAGS = -module -avoid-version $(all_libraries) $(KDE_PLUGIN) 
-
-protocol_DATA = digikamthumbnail.protocol digikamtags.protocol \
-		digikamalbums.protocol digikamdates.protocol \
-		digikamsearch.protocol
-
-protocoldir = $(kde_servicesdir)
--- trunk/extragear/graphics/digikam/libs/jpegutils/Makefile.am #523635:523636
@@ -1,10 +1,14 @@
 METASOURCES = AUTO
 
+INCLUDES = $(LIBKEXIF_CFLAGS) \
+           $(all_includes) \
+           -I$(top_srcdir)/digikam/libs/dmetadata \
+           -I$(top_srcdir)/digikam/libs/dimg
+
 noinst_LTLIBRARIES = libjpegutils.la
 
 libjpegutils_la_SOURCES = jpegmetadata.cpp exifrotate.cpp transupp.cpp
 
 libjpegutils_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
-libjpegutils_la_LIBADD  = $(LIBJPEG) $(LIBKEXIF_LIBS)
 
-INCLUDES = $(LIBKEXIF_CFLAGS) $(all_includes) 
+libjpegutils_la_LIBADD  = $(LIBJPEG) $(LIBKEXIF_LIBS) 
--- trunk/extragear/graphics/digikam/libs/jpegutils/exifrotate.cpp #523635:523636
@@ -1,9 +1,11 @@
 /* ============================================================
- * Author: Renchi Raju <renchi at pooh.tam.uiuc.edu>
- * Date  : 2004-09-29
- * Description : 
+ * Authors: Renchi Raju <renchi at pooh.tam.uiuc.edu>
+ *          Caulier Gilles <caulier dot gilles at kdemail dot net>
+ * Date   : 2004-09-29
+ * Description : perform lossless rotation/flip to JPEG file
  * 
  * Copyright 2004-2005 by Renchi Raju
+ * Copyright      2006 by Gilles Caulier
  * 
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General
@@ -47,13 +49,9 @@
 
 #include <kdebug.h>
 
-// LibKExif includes.
-
-#include <libkexif/kexifdata.h>
-#include <libkexif/kexifutils.h>
-
 // Local includes.
 
+#include "dmetadata.h"
 #include "transupp.h"
 
 namespace Digikam
@@ -71,8 +69,8 @@
     QCString in  = QFile::encodeName(file);
     QCString out = QFile::encodeName(temp);
     
-    KExifData exifData;
-    if (!exifData.readFromFile(file))
+    DMetadata exifData;
+    if (!exifData.load(file))
     {
         // no exif data. return.
         return true;
@@ -87,42 +85,42 @@
         
     // we have the exif info. check the orientation
 
-    switch(exifData.getImageOrientation())
+    switch(exifData.getExifImageOrientation())
     {
-        case(KExifData::UNSPECIFIED):
-        case(KExifData::NORMAL):
+        case(DMetadata::ORIENTATION_UNSPECIFIED):
+        case(DMetadata::ORIENTATION_NORMAL):
             break;
-        case(KExifData::HFLIP):
+        case(DMetadata::ORIENTATION_HFLIP):
         {
             transformoption.transform = JXFORM_FLIP_H;
             break;
         }
-        case(KExifData::ROT_180):
+        case(DMetadata::ORIENTATION_ROT_180):
         {
             transformoption.transform = JXFORM_ROT_180;
             break;
         }
-        case(KExifData::VFLIP):
+        case(DMetadata::ORIENTATION_VFLIP):
         {
             transformoption.transform = JXFORM_FLIP_V;
             break;
         }
-        case(KExifData::ROT_90_HFLIP):
+        case(DMetadata::ORIENTATION_ROT_90_HFLIP):
         {
             transformoption.transform = JXFORM_TRANSPOSE;
             break;
         }
-        case(KExifData::ROT_90):
+        case(DMetadata::ORIENTATION_ROT_90):
         {
             transformoption.transform = JXFORM_ROT_90;
             break;
         }
-        case(KExifData::ROT_90_VFLIP):
+        case(DMetadata::ORIENTATION_ROT_90_VFLIP):
         {
             transformoption.transform = JXFORM_TRANSVERSE;
             break;
         }
-        case(KExifData::ROT_270):
+        case(DMetadata::ORIENTATION_ROT_270):
         {
             transformoption.transform = JXFORM_ROT_270;
             break;
@@ -207,7 +205,7 @@
     fclose(output_file);
 
     // reset the orientation of the temp file to normal
-    KExifUtils::writeOrientation(temp, KExifData::NORMAL);
+    exifData.writeExifImageOrientation(temp, DMetadata::ORIENTATION_NORMAL);
 
     // set the file modification time of the temp file to that
     // of the original file
--- trunk/extragear/graphics/digikam/libs/jpegutils/exifrotate.h #523635:523636
@@ -1,9 +1,11 @@
 /* ============================================================
- * Author: Renchi Raju <renchi at pooh.tam.uiuc.edu>
- * Date  : 2004-09-29
- * Description : 
+ * Authors: Renchi Raju <renchi at pooh.tam.uiuc.edu>
+ *          Caulier Gilles <caulier dot gilles at kdemail dot net>
+ * Date   : 2004-09-29
+ * Description : perform lossless rotation/flip to JPEG file
  * 
  * Copyright 2004-2005 by Renchi Raju
+ * Copyright      2006 by Gilles Caulier
  *
  * This program is free software; you can redistribute it
  * and/or modify it under the terms of the GNU General



More information about the Digikam-devel mailing list