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

List:       kde-commits
Subject:    extragear/graphics/showimg
From:       Richard Groult <Richard.Groult () jalix ! org>
Date:       2007-02-18 12:39:16
Message-ID: 1171802356.016695.22325.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 634822 by groult:

'dmetadata' replaced with 'kexiv2'


 M  +27 -15    configure.in.bot  
 M  +15 -0     configure.in.in  
 M  +1 -2      showimg/Makefile.am  
 M  +12 -11    showimg/cdarchivecreator.cpp  
 M  +2 -1      showimg/imagelistview.cpp  
 M  +13 -12    showimg/imageloader.cpp  
 M  +3 -2      showimg/imagemetainfo.cpp  


--- trunk/extragear/graphics/showimg/configure.in.bot #634821:634822
@@ -4,31 +4,43 @@
 if test "x$showimg_enabled" = "xyes" ; then
 	if test "x$want_kipi" = "xyes" ; then
 		if test "x$have_libkipi" = "xyes"; then
-			echo "kipi plugin support for ShowImg:      yes"
+			echo "-- kipi plugin support for ShowImg:......yes"
 		else
-			echo "kipi plugin support for ShowImg:       no"
-			echo "    You are missing the kipi headers and libraries"
+			echo "-- kipi plugin support for ShowImg:.......no"
+			echo "    You are missing the kipi headers and libraries."
 			echo "    The kipi plugin support won't be compiled."
+			echo "    The kipi plugin website is at http://www.kipi-plugins.org"
 		fi
 	else
 		echo "kipi plugin support for ShowImg:       no"
 	fi
 
-if test "x$have_exiv2" != "xyes"; then
-  echo "exiv2 support for ShowImg:             no"
-  echo ""
-  echo "ShowImg needs Exiv2 library. You need to install Exiv2 first"
-  echo "Exiv2 website is at http://www.exiv2.org"
-  echo ""
-  all_tests=bad
-else
-  echo "exiv2 support for ShowImg:            yes"
-fi
+	if test "x$have_exiv2" != "xyes"; then
+	  echo "-- Exiv2 library found............ no"
+	  echo ""
+	  echo "     ShowImg needs Exiv2 library. You need to install Exiv2 first."
+	  echo "     Exiv2 website is at http://www.exiv2.org"
+	  echo ""
+	  all_tests=bad
+	else
+	  echo "-- Exiv2 library found............ yes"
+	fi
 	
+	if test "x$have_libkexiv2" != "xyes"; then
+	  echo "-- libkexiv2 library found............ no"
+	  echo ""
+	  echo "     ShowImg needs libkexiv2 library. You need to install libkexiv2 first."
+	  echo "     libkexiv2 website is at http://www.kipi-plugins.org"
+	  echo ""
+	  all_tests=bad
+	else
+	  echo "-- libkexiv2 library found............ yes"
+	fi
+	
 	if test "x$want_showimgdb" = "xyes" ; then
-		echo "kexidb/showimgdb support for ShowImg: yes"
+		echo "-- kexidb/showimgdb support for ShowImg:..yes"
 	else
-		echo "kexidb/showimgdb support for ShowImg:  no"
+		echo "-- kexidb/showimgdb support for ShowImg:...no"
 	fi
 else
 	echo "ShowImg will not be compiled (missing konq_operations.h)."
--- trunk/extragear/graphics/showimg/configure.in.in #634821:634822
@@ -78,8 +78,23 @@
   AC_DEFINE(HAVE_LIBEXIV2, 1, [If we have libexiv2])
 fi
 
+#------------------------------------------------------------------
+# Check for libkexiv2 library
+#------------------------------------------------------------------
 
+have_libkexiv2='no'
+KDE_CHECK_HEADER(libkexiv2/kexiv2.h, have_libkexiv2=yes, have_libkexiv2=no)
 
+if test "x$have_libkexiv2" != "xyes"; then
+  AC_WARN([libkexiv2 library not found.])
+else
+  LIB_EXIV2="-lkexiv2"
+  AC_SUBST(LIB_KEXIV2)
+  AC_DEFINE(HAVE_LIBKEXIV2, 1, [If we have libkexiv2])
+fi
+
+
+
 #---------------------------------------------------------
 # libexif detection
 #---------------------------------------------------------
--- trunk/extragear/graphics/showimg/showimg/Makefile.am #634821:634822
@@ -1,4 +1,4 @@
-SUBDIRS =  khexedit kipiplugins misc metadata . mimetypes  pics icons
+SUBDIRS =  khexedit kipiplugins misc . mimetypes  pics icons
 
 INCLUDES =  -I$(showimg_top_srcdir) $(all_includes)
 
@@ -18,7 +18,6 @@
 	misc/libmisc.la \
 	khexedit/libkhexedit.la \
 	kipiplugins/libkipiplugins.la \
-	metadata/libmetadata.la \
         $(LIBKEXIDB_LDDADD)
 
 
--- trunk/extragear/graphics/showimg/showimg/cdarchivecreator.cpp #634821:634822
@@ -43,7 +43,8 @@
 
 #ifdef HAVE_LIBEXIV2
 #include <exiv2/exif.hpp>
-#include "metadata/dmetadata.h"
+#include <libkexiv2/kexiv2.h>
+//#include "metadata/dmetadata.h"
 #else
 #ifdef __GNUC__
 #warning no HAVE_LIBEXIV2
@@ -246,19 +247,19 @@
 				}
 			}
 #else /* #ifndef HAVE_LIBEXIV2 */
-			DMetadata l_exif_data(l_original_image_path, \
KImageIO::typeForMime(Tools::getJPEGMimeType())); +			KExiv2Iface::KExiv2 \
l_exif_data(l_original_image_path);  QWMatrix l_transform_matrix;
 			switch(l_exif_data.getImageOrientation())
 			{
-				case DMetadata::ORIENTATION_UNSPECIFIED   :  break;
-				case DMetadata::ORIENTATION_NORMAL        :   break;
-				case DMetadata::ORIENTATION_HFLIP         : l_transform_matrix.scale( 1, -1 ); \
                break;
-				case DMetadata::ORIENTATION_ROT_180       : l_transform_matrix.rotate(180);    \
                break;
-				case DMetadata::ORIENTATION_VFLIP         : l_transform_matrix.scale( -1, 1 ); \
                break;
-				case DMetadata::ORIENTATION_ROT_90_HFLIP  : l_transform_matrix.rotate(90);     \
                l_transform_matrix.scale( 1, -1 ); break;
-				case DMetadata::ORIENTATION_ROT_90        : l_transform_matrix.rotate(90);     \
                break;
-				case DMetadata::ORIENTATION_ROT_90_VFLIP  : l_transform_matrix.rotate(0);      \
                l_transform_matrix.scale( -1, 1 ); break;
-				case DMetadata::ORIENTATION_ROT_270       : l_transform_matrix.rotate(270);    \
break; +				case KExiv2Iface::KExiv2::ORIENTATION_UNSPECIFIED   :  break;
+				case KExiv2Iface::KExiv2::ORIENTATION_NORMAL        :   break;
+				case KExiv2Iface::KExiv2::ORIENTATION_HFLIP         : l_transform_matrix.scale( \
1, -1 ); break; +				case KExiv2Iface::KExiv2::ORIENTATION_ROT_180       : \
l_transform_matrix.rotate(180);    break; +				case \
KExiv2Iface::KExiv2::ORIENTATION_VFLIP         : l_transform_matrix.scale( -1, 1 ); \
break; +				case KExiv2Iface::KExiv2::ORIENTATION_ROT_90_HFLIP  : \
l_transform_matrix.rotate(90);     l_transform_matrix.scale( 1, -1 ); break; \
+				case KExiv2Iface::KExiv2::ORIENTATION_ROT_90        : \
l_transform_matrix.rotate(90);     break; +				case \
KExiv2Iface::KExiv2::ORIENTATION_ROT_90_VFLIP  : l_transform_matrix.rotate(0);      \
l_transform_matrix.scale( -1, 1 ); break; +				case \
KExiv2Iface::KExiv2::ORIENTATION_ROT_270       : l_transform_matrix.rotate(270);    \
break;  }
 			QImage l_exif_thumb(l_exif_data.getExifThumbnail(true).xForm(l_transform_matrix));
  if(!l_exif_thumb.isNull())
--- trunk/extragear/graphics/showimg/showimg/imagelistview.cpp #634821:634822
@@ -68,7 +68,8 @@
 
 #ifdef HAVE_LIBEXIV2
 #include <exiv2/exif.hpp>
-#include "metadata/dmetadata.h"
+#include <libkexiv2/kexiv2.h>
+//#include "metadata/dmetadata.h"
 #else
 #ifdef __GNUC__
 #warning no HAVE_LIBEXIV2
--- trunk/extragear/graphics/showimg/showimg/imageloader.cpp #634821:634822
@@ -56,7 +56,8 @@
 
 #ifdef HAVE_LIBEXIV2
 #include <exiv2/exif.hpp>
-#include "metadata/dmetadata.h"
+#include <libkexiv2/kexiv2.h>
+//#include "metadata/dmetadata.h"
 #else
 #ifdef __GNUC__
 #warning no HAVE_LIBEXIV2
@@ -479,21 +480,21 @@
 				}
 #else // HAVE_LIBEXIV2
 #if IMALOADER_DEBUG_THREAD > 0
-				MYDEBUG<<"DMetadata l_exif_data(l_image_fileinfo.absFilePath \
())="<<l_image_fileinfo.absFilePath ()<<endl; +				MYDEBUG<<"KExiv2Iface::KExiv2 \
l_exif_data(l_image_fileinfo.absFilePath ())="<<l_image_fileinfo.absFilePath \
()<<endl;  #endif
-				DMetadata l_exif_data(l_image_fileinfo.absFilePath (), \
KImageIO::type(l_image_fileinfo.absFilePath ())); +				KExiv2Iface::KExiv2 \
l_exif_data(l_image_fileinfo.absFilePath ());  QWMatrix l_transform_matrix;
 				switch(l_exif_data.getImageOrientation())
 				{
-					case DMetadata::ORIENTATION_UNSPECIFIED   :    break;
-					case DMetadata::ORIENTATION_NORMAL        :    break;
-					case DMetadata::ORIENTATION_HFLIP         : l_transform_matrix.scale( 1, -1 ); \
                break;
-					case DMetadata::ORIENTATION_ROT_180       : l_transform_matrix.rotate(180);    \
                break;
-					case DMetadata::ORIENTATION_VFLIP         : l_transform_matrix.scale( -1, 1 ); \
                break;
-					case DMetadata::ORIENTATION_ROT_90_HFLIP  : l_transform_matrix.rotate(90);     \
                l_transform_matrix.scale( 1, -1 ); break;
-					case DMetadata::ORIENTATION_ROT_90        : l_transform_matrix.rotate(90);     \
                break;
-					case DMetadata::ORIENTATION_ROT_90_VFLIP  : l_transform_matrix.rotate(0);      \
                l_transform_matrix.scale( -1, 1 ); break;
-					case DMetadata::ORIENTATION_ROT_270       : l_transform_matrix.rotate(270);    \
break; +					case KExiv2Iface::KExiv2::ORIENTATION_UNSPECIFIED   :    break;
+					case KExiv2Iface::KExiv2::ORIENTATION_NORMAL        :    break;
+					case KExiv2Iface::KExiv2::ORIENTATION_HFLIP         : l_transform_matrix.scale( \
1, -1 ); break; +					case KExiv2Iface::KExiv2::ORIENTATION_ROT_180       : \
l_transform_matrix.rotate(180);    break; +					case \
KExiv2Iface::KExiv2::ORIENTATION_VFLIP         : l_transform_matrix.scale( -1, 1 ); \
break; +					case KExiv2Iface::KExiv2::ORIENTATION_ROT_90_HFLIP  : \
l_transform_matrix.rotate(90);     l_transform_matrix.scale( 1, -1 ); break; \
+					case KExiv2Iface::KExiv2::ORIENTATION_ROT_90        : \
l_transform_matrix.rotate(90);     break; +					case \
KExiv2Iface::KExiv2::ORIENTATION_ROT_90_VFLIP  : l_transform_matrix.rotate(0);      \
l_transform_matrix.scale( -1, 1 ); break; +					case \
KExiv2Iface::KExiv2::ORIENTATION_ROT_270       : l_transform_matrix.rotate(270);    \
break;  }
 				QImage l_exif_thumb(l_exif_data.getExifThumbnail(true).xForm(l_transform_matrix));
  if(!l_exif_thumb.isNull())
--- trunk/extragear/graphics/showimg/showimg/imagemetainfo.cpp #634821:634822
@@ -50,7 +50,8 @@
 
 #ifdef HAVE_LIBEXIV2
 #include <exiv2/exif.hpp>
-#include "metadata/dmetadata.h"
+#include <libkexiv2/kexiv2.h>
+//#include "metadata/dmetadata.h"
 #else
 #ifdef __GNUC__
 #warning no HAVE_LIBEXIV2
@@ -304,7 +305,7 @@
 		QFileInfo(url.path()).exists()
 	)
 	{
-		DMetadata l_exif_data(url.path(), "JPEG");
+		KExiv2Iface::KExiv2 l_exif_data(url.path ());
 		QPixmap pix = KPixmapIO().convertToPixmap(l_exif_data.getExifThumbnail(false));
 		if(!pix.isNull())
 		{


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

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