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

Gilles Caulier caulier.gilles at free.fr
Wed Jan 11 15:19:01 GMT 2006


SVN commit 496965 by cgilles:

digikam from trunk : ICC profiles image properties side bar tab : add new EIC tonge graph relevant of embedded image ICC profile.
A screenshot : http://digikam3rdparty.free.fr/Screenshots/digikamEICtonge.png
The code use liblprof library from lprof core implementation.

Nota : there is a little problem to digikam/libs/lprof/Makefile.am. Look my comments into this file and let's me hear if anybody have a better solution.

CCMAIL: digikam-devel at kde.org


 M  +1 -1      Makefile.am  
 M  +1 -0      imageproperties/Makefile.am  
 M  +10 -3     imageproperties/imagepropertiescolorstab.cpp  
 M  +7 -4      imageproperties/imagepropertiescolorstab.h  
 A             lprof (directory)  
 A             lprof/Makefile.am  
 A             lprof/cmshull.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmslm.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmslnr.c   [License: GPL (v2+) (wrong address) GENERATED FILE] [UTF-8 ENCODING PROBLEMS]
 A             lprof/cmsmatn.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmsmkmsh.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmsmntr.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmsoutl.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmspcoll.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmsprf.c   [License: LGPL (v2+) (wrong address)]
 A             lprof/cmsreg.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmsscn.c   [License: GPL (v2+) (wrong address) GENERATED FILE]
 A             lprof/cmssheet.c   [License: GPL (v2+) (wrong address) GENERATED FILE] [UTF-8 ENCODING PROBLEMS]
 A             lprof/lcmsprf.h   [License: GPL (v2+) (wrong address) GENERATED FILE]
 M  +4 -1      widgets/Makefile.am  
 A             widgets/cietongewidget.cpp   [License: GPL]
 A             widgets/cietongewidget.h   [License: GPL]


--- trunk/extragear/graphics/digikam/libs/Makefile.am #496964:496965
@@ -1 +1 @@
-SUBDIRS = dcraw histogram levels curves dimg threadimageio themeengine widgets filters thumbbar jpegutils imageproperties dialogs 
+SUBDIRS = lprof dcraw histogram levels curves dimg threadimageio themeengine widgets filters thumbbar jpegutils imageproperties dialogs 
--- trunk/extragear/graphics/digikam/libs/imageproperties/Makefile.am #496964:496965
@@ -26,6 +26,7 @@
 	       -I$(top_srcdir)/digikam/libs/widgets \
 	       -I$(top_srcdir)/digikam/libs/dimg \
 	       -I$(top_srcdir)/digikam/libs/threadimageio \
+	       -I$(top_srcdir)/digikam/libs/lprof \
 	       -I$(top_srcdir)/digikam/digikam \
 	       $(LIBKEXIF_CFLAGS) $(all_includes)
 
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiescolorstab.cpp #496964:496965
@@ -18,6 +18,8 @@
  * 
  * ============================================================ */
 
+#include <config.h>
+
 // C++ include.
 
 #include <cstring>
@@ -55,6 +57,7 @@
 #include "colorgradientwidget.h"
 #include "navigatebarwidget.h"
 #include "loadsavethread.h"
+#include "cietongewidget.h"
 #include "imagepropertiescolorstab.h"
 
 #include LCMS_HEADER
@@ -260,7 +263,7 @@
     // ICC Profiles tab area ---------------------------------------
     
     QWidget* iccprofilePage = new QWidget( tab );
-    QGridLayout *iccLayout = new QGridLayout(iccprofilePage, 8, 3, KDialog::marginHint(), KDialog::spacingHint());
+    QGridLayout *iccLayout = new QGridLayout(iccprofilePage, 9, 3, KDialog::marginHint(), KDialog::spacingHint());
     
     QGroupBox *iccbox = new QGroupBox(2, Qt::Vertical, iccprofilePage);
     iccbox->setFrameStyle (QFrame::NoFrame);
@@ -280,9 +283,12 @@
     QLabel *labelColor = new QLabel(i18n("Color Space: "), iccdetail);
     m_labelICCColorSpace = new KSqueezedTextLabel(0, iccdetail);
 
+    m_cieTonge = new CIETongeWidget(256, 256, iccprofilePage);
+    
     iccLayout->addMultiCellWidget(iccbox, 0, 0, 0, 2);
-    iccLayout->addMultiCellWidget(iccdetail, 2, 7, 0, 5);
-    iccLayout->setRowStretch(8, 10);
+    iccLayout->addMultiCellWidget(iccdetail, 2, 7, 0, 2);
+    iccLayout->addMultiCellWidget(m_cieTonge, 8, 8, 0, 2);
+    iccLayout->setRowStretch(9, 10);
 
     tab->addTab(iccprofilePage, i18n("ICC profile") );
 
@@ -697,6 +703,7 @@
         m_infoHeader->setText(i18n("Image Color Profile Info:"));
         
         m_embedded_profile = m_image.getICCProfil();
+        m_cieTonge->setProfileData(&m_embedded_profile);
         embProfile = cmsOpenProfileFromMem(m_embedded_profile.data(),
                                           (DWORD)m_embedded_profile.size());
         m_labelICCName->setText(QString(cmsTakeProductName(embProfile)));
--- trunk/extragear/graphics/digikam/libs/imageproperties/imagepropertiescolorstab.h #496964:496965
@@ -48,6 +48,7 @@
 class ColorGradientWidget;
 class NavigateBarWidget;
 class ManagedLoadSaveThread;
+class CIETongeWidget;
 
 class DIGIKAM_EXPORT ImagePropertiesColorsTab : public QWidget
 {
@@ -116,6 +117,10 @@
     QLabel                *m_labelAlphaChannel;
     QLabel                *m_infoHeader;
     
+    QString                m_currentFilePath;
+
+    QRect                 *m_selectionArea;
+        
     KSqueezedTextLabel    *m_labelICCName;
     KSqueezedTextLabel    *m_labelICCDescription;
     KSqueezedTextLabel    *m_labelICCCopyright;
@@ -125,14 +130,12 @@
     DImg                   m_image;
     DImg                   m_imageSelection;
     
-    QRect                 *m_selectionArea;
-    
     ColorGradientWidget   *m_hGradient;
     HistogramWidget       *m_histogramWidget;
     NavigateBarWidget     *m_navigateBar;
     ManagedLoadSaveThread *m_imageLoaderThreaded;
-    QString                m_currentFilePath;
-
+    CIETongeWidget        *m_cieTonge;
+    
     QByteArray             m_embedded_profile;
     
 };
--- trunk/extragear/graphics/digikam/libs/widgets/Makefile.am #496964:496965
@@ -5,13 +5,16 @@
 libwidgets_la_SOURCES = imageregionwidget.cpp imagepaniconwidget.cpp \
 			            histogramwidget.cpp colorgradientwidget.cpp imageselectionwidget.cpp \
 			            imageguidewidget.cpp curveswidget.cpp imagepannelwidget.cpp \
-			            sidebar.cpp
+			            sidebar.cpp cietongewidget.cpp 
 
 libwidgets_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
+libwidgets_la_LIBADD = $(top_builddir)/digikam/libs/lprof/liblprof.la 
+
 INCLUDES = -I$(top_srcdir)/digikam/libs/histogram \
 	       -I$(top_srcdir)/digikam/libs/curves \
 	       -I$(top_srcdir)/digikam/libs/dimg \
+	       -I$(top_srcdir)/digikam/libs/lprof \
 	       -I$(top_srcdir)/digikam/digikam \
 	       -I$(top_srcdir)/digikam/utilities/imageeditor/editor \
 	       $(all_includes)



More information about the Digikam-devel mailing list