Bug 125733 - Enabling 'Always apply ICM profiles' can lead to suprising results
Summary: Enabling 'Always apply ICM profiles' can lead to suprising results
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: ColorManagement-Views (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-17 14:45 UTC by Duncan Hill
Modified: 2022-02-01 11:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Hill 2006-04-17 14:45:42 UTC
Version:           0.9 SVN (using KDE KDE 3.5.2)
Compiler:          gcc 4.0.2 prerelease 
OS:                Linux

If the ICM option is configured to always apply the ICC profile to an image when the editor is opened, the result can be quite a suprise to the unsuspecting user.

Open a RAW file with sRGB for Workspace and Monitor, and the camera profile for Input.
Save the file as PNG or JPG.
Close the RAW.
Open the PNG/JPG.
Notice that the profile has been doubly-applied, so the picture is 'ruined'.

Arguably, setting the option to 'Ask whether to apply profile' is the way around this.  However, when I'm working on 1000 RAW images, having to click that extra button each time is slightly annoying.  Perhaps digiKam should embed the profile data that was applied when a save is done, and detect that there is already a profile in place.
Comment 1 caulier.gilles 2006-04-17 15:06:34 UTC
Well, nothing to say anymore Ducan. This is exatly what we need to do before to release 0.9.0-beta1 (:=)))...

Me and Paco, we will working on, no problem...

I suspect a problem too with worksapce profile (normally sRGB or something like that). I think that lcms perform a transformation into image if we pass a workspace profile during color correction. To have tested with my MRW raw file (Dynax 5D) without to use a workspace profile, this give always better result like this. I think we don't need to use a workspace profile in digikam, because image editor always work in RGB color space.

Please try to set a icc profile repository with only your camera profile on, load your RAW files in editor, and give me a report...

Gilles Caulier
Comment 2 Duncan Hill 2006-04-17 15:49:13 UTC
Well, I just shot 1000 photos over in the Netherlands, so I certainly have a large selection to test with.

http://www.cricalix.net/~dhill/digikam/PICT2698-5D.jpg
http://www.cricalix.net/~dhill/digikam/PICT2698-sRGB-and-5D.jpg

The sRGB profile is taken from the ICC repo you've linked before, and the 5D is either from there, or out of Dimage Master (which I think is the one in the repo you linked).

If I re-edit the -5D photo (dark one, jpg format, not mrw) with the sRGB profile  enabled, the colours are lightened properly.

The ~dhill/digikam directory is browseable, and the source MRW file is in there (it's an ADSL link, so it might be a bit slow) if you want the source too.  Since I didn't enable the embedded profile stuff on the 5D, it's probably all in sRGB anyway.
Comment 3 F.J. Cruz 2006-04-18 10:05:30 UTC
---- Duncan Hill <kdebugs@nacnud.force9.co.uk> escribió: 
[bugs.kde.org quoted mail]

We know about this issue and are working to embed profiles in pictures. In any case, this is the way other graphic apps work.

Paco Cruz
Comment 4 Duncan Hill 2006-04-18 10:19:46 UTC
Might I suggest that the default for 0.9 be 'Ask to apply' then?  It will avoid the suprise factor (though at the cost of annoyance factor perhaps).

Alternately, considering that the editor is able to talk to digiKam, extend the meta-data for each image by 1 column to hold a boolean 'profile applied', and then detect in the 'Ask' dialog that a profile was already applied, and give a hint to that effect?
Comment 5 F.J. Cruz 2006-04-18 10:28:21 UTC
---- Duncan Hill <kdebugs@nacnud.force9.co.uk> escribió: 
[bugs.kde.org quoted mail]

This could be a solution.

> Alternately, considering that the editor is able to talk to digiKam, extend the
>meta-data for each image by 1 column to hold a boolean 'profile applied', and then > detect in the 'Ask' dialog that a profile was already applied, and give a hint to that > effect?


I think this workaround isn't the solution. We have to embed the profiles to get an "standard" behaviour.

Paco Cruz
Comment 6 caulier.gilles 2006-04-18 13:45:10 UTC
yes, i'm agree with Paco about this point...

Gilles
Comment 7 caulier.gilles 2006-05-10 14:52:05 UTC
The implementation to store ICC profile into image is done in svn and will be availalble to 0.9.0 release. The color workspace profile is stored into the target image. The RAW workflow is now complete.

I close this file.

Gilles Caulier
Comment 8 caulier.gilles 2006-05-12 10:11:29 UTC
SVN commit 539979 by cgilles:

digikam from trunk : RAW decoding and ICC color management workflow into image editor: If "using embeded ICC profile into RAW file" dcraw option is used, disable Image Editor color management.

IMPORTANT : there is a full description of the ICC color management workflow with RAW files in the DImgInterface::slotImageLoaded() method from dimginterface.cpp. Please take a look...

Gerhard : please check these description to write the digiKam handbook. Thanks in advance...

CCBUGS: 125733
CCMAIL: digikam-devel@kde.org, francisco.jct@gmail.com, gerhard@kulzer.net

 M  +68 -2     imageeditor/canvas/dimginterface.cpp  
 M  +0 -18     imageeditor/editor/editorwindow.cpp  
 M  +2 -2      setup/setupiofiles.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #539978:539979
@@ -209,11 +209,77 @@
         d->valid      = true;
         d->width      = d->origWidth;
         d->height     = d->origHeight;
+        valRet        = true;
 
-        valRet        = true;
+        /* -----------------------------------------------------------------------------
+         * ICC workflow rules depending of IO file settings and ICC managment settings
+         * if a RAW image is loaded:
+         * 
+         ***************************************************************
+         * RAW ICC color   *    digiKam color   *     digiKam color    *
+         *   correction    *     management     *      management      *
+         * during decoding *       enable       *        disable       *
+         ***************************************************************
+         *                 *   digiKam ICC      *                      *
+         *    Disable      *  workflow will be  *    nothing to do     *
+         *    (NOICC)      *     only used      *                      *
+         *                 *                    *                      *
+         *                 *  [enableICC = ON]  *  [enableICC = OFF]   *
+         ***************************************************************
+         *                 *   digiKam ICC      *    If an embeded     *
+         *  Using embeded  *   workflow is      * profile is found in  *
+         *     profile     *     disable        * image, dcraw use it  *
+         *     (EMBED)     *                    * output profile=sRGB  *
+         *                 *                    *                      *
+         *                 *  [enableICC = OFF] *  [enableICC = OFF]   *
+         ***************************************************************
+         *                 *  Input and output  *                      *
+         *  Using digiKam  *   color profiles   *    nothing to do     *
+         *   ICC settings  *  from digiKam ICC  *                      *
+         *  (USERPROFILE)  *  settings will be  *                      *
+         *                 *    used by dcraw   *                      *
+         *                 *                    *                      *
+         *                 *  [enableICC = OFF] *  [enableICC = OFF]   *
+         ***************************************************************
+         *
+         * NOTE: If we trying to use the embedded ICC color profile from a RAW file we 
+         *       cannot use the digiKam ICC color management here because we don't have 
+         *       a feedback from dcraw if an embedded profile have been really found in 
+         *       the picture and applied to the image. A solution will be found to use 
+         *       libopenraw instead dcraw in the future.
+         *
+         */        
+
+        // With other format than RAW, we can using digiKam ICC color management workflow.
+        bool enableICC = true;
         
-        if (d->cmSettings->enableCMSetting)
+        if (d->image.attribute("format").toString() == QString("RAW"))
         {
+            switch (d->iofileSettings->rawDecodingSettings.ICCColorCorrectionMode)
+            {
+                case RawDecodingSettings::NOICC:
+                {
+                    d->cmSettings->enableCMSetting ? enableICC = true : enableICC = false;  
+                    break;
+                }
+                case RawDecodingSettings::EMBED:
+                {
+                    enableICC = false;
+                    break;
+                }
+                case RawDecodingSettings::USERPROFILE:
+                {
+                    enableICC = false;
+                    break;
+                }
+            }
+            
+            if (enableICC == false)            
+                kdWarning() << "ICC workflow have been disable with this image!" << endl;
+        }    
+
+        if (d->cmSettings->enableCMSetting && enableICC)
+        {
             if (d->cmSettings->askOrApplySetting)
             {
                 apply = true;
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #539978:539979
@@ -734,24 +734,6 @@
     m_IOFileSettings->rawDecodingSettings.cameraICCProfilePath    = m_ICCSettings->inputSetting;
     m_IOFileSettings->rawDecodingSettings.outputICCProfilePath    = m_ICCSettings->workspaceSetting;
     
-    // If ICC color management is disabled, we need to control finely ICC color corrections during RAW files decoding.
-    if (!m_ICCSettings->enableCMSetting)
-    {
-        switch (m_IOFileSettings->rawDecodingSettings.ICCColorCorrectionMode)
-        {
-            case RawDecodingSettings::EMBED:
-                // Disable ouput ICC profile corrections.
-                m_IOFileSettings->rawDecodingSettings.outputICCProfilePath = QString::null;
-                break;
-            case RawDecodingSettings::USERPROFILE:
-                // Disable all.
-                m_ICCSettings->enableCMSetting = RawDecodingSettings::NOICC;
-                break;
-            default:
-                break;
-        }
-    }
-
     // -- GUI Settings -------------------------------------------------------
     
     QSizePolicy rightSzPolicy(QSizePolicy::Preferred, QSizePolicy::Expanding, 2, 1);
--- trunk/extragear/graphics/digikam/utilities/setup/setupiofiles.cpp #539978:539979
@@ -195,9 +195,9 @@
     d->iccColorsCorrection->insertItem( i18n("Using digiKam ICC settings") );
     QWhatsThis::add( d->iccColorsCorrection, i18n("<p>This option toogle the right way to use ICC color profiles during "
                      "RAW files decoding.<p>"
-                     "If you want do all ICC color correction outside RAW file decoding process, use <b>Disabled</b>.<p>"
+                     "If you want to process all the ICC color correction outside RAW file decoding, use <b>Disabled</b>.<p>"
                      "If you want to use the embeded ICC profile includes into RAW files (if exists), use "
-                     "<b>Using embeded profile</b>.<p>"
+                     "<b>Using embeded profile</b>. Warning: with this option the ICC color correction processed outside the RAW file decoding will be disable!<p>"
                      "If you want to use the ICC profiles setttings from ICC color management page, use "
                      "<b>Using digiKam ICC Settings</b>. You need to enable and set the right ICC color managment for that.<p>"));
     hlay->addWidget(labelICCCorrection);
Comment 9 caulier.gilles 2006-05-13 12:34:45 UTC
SVN commit 540385 by cgilles:

digiKam from trunk : if ICC profiles are used by dcraw during RAW file decoding instead digiKam workflow, well store output colorspace profile in DImg instance of image editor. nota: the output workspace is the same in both!

CCBUGS: 125733

 M  +21 -9     dimginterface.cpp  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #540384:540385
@@ -216,7 +216,7 @@
          * if a RAW image is loaded:
          * 
          ***************************************************************
-         * RAW ICC color   *    digiKam color   *     digiKam color    *
+         *  RAW ICC color  *    digiKam color   *     digiKam color    *
          *   correction    *     management     *      management      *
          * during decoding *       enable       *        disable       *
          ***************************************************************
@@ -226,18 +226,24 @@
          *                 *                    *                      *
          *                 *  [enableICC = ON]  *  [enableICC = OFF]   *
          ***************************************************************
-         *                 *   digiKam ICC      *    If an embeded     *
-         *  Using embeded  *   workflow is      * profile is found in  *
-         *     profile     *     disable        * image, dcraw use it  *
-         *     (EMBED)     *                    * output profile=sRGB  *
+         *                 *    digiKam ICC     *    If an embeded     *
+         *  Using embeded  *     workflow is    * profile is found in  *
+         *     profile     *   disable. If an   * image, dcraw use it. *
+         *                 *   embeded color    *   The output color   *
+         *                 *  is found in RAW   *   space profile is   *
+         *                 * file, dcraw use it *         sRGB         *
+         *     (EMBED)     * The output profile *                      *
+         *                 * set in digiKam ICC *                      *
+         *                 *  settings will be  *                      *
+         *                 *    used by dcraw   *                      *
          *                 *                    *                      *
          *                 *  [enableICC = OFF] *  [enableICC = OFF]   *
          ***************************************************************
-         *                 *  Input and output  *                      *
-         *  Using digiKam  *   color profiles   *    nothing to do     *
+         *                 *  Input and output  *     nothing to do    *
+         *  Using digiKam  *   color profiles   *                      *
          *   ICC settings  *  from digiKam ICC  *                      *
          *  (USERPROFILE)  *  settings will be  *                      *
-         *                 *    used by dcraw   *                      *
+         *                 *   used by dcraw    *                      *
          *                 *                    *                      *
          *                 *  [enableICC = OFF] *  [enableICC = OFF]   *
          ***************************************************************
@@ -265,17 +271,23 @@
                 case RawDecodingSettings::EMBED:
                 {
                     enableICC = false;
+                    // The workspace profile set in digiKam workflow have been used by dcraw to decode 
+                    // RAW picture saved. We store it into DImg instance.
+                    d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting));
                     break;
                 }
                 case RawDecodingSettings::USERPROFILE:
                 {
                     enableICC = false;
+                    // The workspace profile set in digiKam workflow have been used by dcraw to decode 
+                    // RAW picture saved. We store it into DImg instance.
+                    d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting));
                     break;
                 }
             }
             
             if (enableICC == false)            
-                kdWarning() << "ICC workflow have been disable with this image!" << endl;
+                kdWarning() << "digiKam ICC workflow have been disable with this image!" << endl;
         }    
 
         if (d->cmSettings->enableCMSetting && enableICC)
Comment 10 caulier.gilles 2006-05-14 16:15:26 UTC
SVN commit 540705 by cgilles:

digikam from trunk : Optimize monitor ICC color corrections rendering to the screen to load ICC color profiles in memory using QByteArray. Indeep regression tests are requires.

CCMAIL: francisco.jct@gmail.com
CCBUGS: 125733


 M  +0 -1      TODO  
 M  +10 -10    libs/dimg/Makefile.am  
 M  +8 -13     libs/dimg/dimg.cpp  
 M  +3 -3      libs/dimg/dimg.h  
 M  +56 -36    libs/dimg/filters/icctransform.cpp  
 M  +7 -1      libs/dimg/filters/icctransform.h  
 M  +5 -8      showfoto/showfoto.cpp  
 M  +2 -3      utilities/imageeditor/canvas/canvas.cpp  
 M  +2 -5      utilities/imageeditor/canvas/canvas.h  
 M  +12 -8     utilities/imageeditor/canvas/dimginterface.cpp  
 M  +2 -2      utilities/imageeditor/canvas/dimginterface.h  
 M  +16 -14    utilities/imageeditor/editor/editorwindow.cpp  
 M  +0 -2      utilities/imageeditor/editor/editorwindow.h  
 M  +26 -21    utilities/imageeditor/editor/editorwindowprivate.h  
 M  +5 -3      utilities/imageeditor/editor/imageiface.cpp  
 M  +1 -8      utilities/imageeditor/editor/imagewindow.cpp  
 M  +2 -2      utilities/setup/setupiofiles.cpp  
Comment 11 caulier.gilles 2006-05-15 11:21:19 UTC
SVN commit 540980 by cgilles:

digikam from trunk : new dialog to display a preview of ICC color correction when "Color Management Policy::Behaviour::Ask when open an image in image editor" option is enable in digiKam ICC setup.

This dialog remplace the simple KMessageBox (witch one give no feedback to user) . We have now 2 image previews to compare original and target before to process the ICC workspace conversion. This is important when user load a RAW picture on a slow computer where Raw decoding can be long : if the ICC workspace correction isn't correct, no need to close editor and re-load picture to select the right option (:=)))...

CCMAIL: digikam-devel@kde.org, francisco.jct@gmail.com
CCBUGS: 125733

 M  +10 -10    Makefile.am  
 M  +1 -0      canvas.cpp  
 A             colorcorrectiondlg.cpp   [License: GPL]
 A             colorcorrectiondlg.h   [License: GPL]
 M  +14 -6     dimginterface.cpp  
 M  +0 -4      dimginterface.h  


--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/Makefile.am #540979:540980
@@ -2,23 +2,23 @@
 
 noinst_LTLIBRARIES = libdimgcanvas.la
 
-libdimgcanvas_la_SOURCES = dimginterface.cpp \
-	                       canvas.cpp undocache.cpp \
-			               undoaction.cpp undomanager.cpp \
-			               imagepluginloader.cpp imageplugin.cpp
+libdimgcanvas_la_SOURCES = dimginterface.cpp colorcorrectiondlg.cpp \
+	                   canvas.cpp undocache.cpp \
+		           undoaction.cpp undomanager.cpp \
+		           imagepluginloader.cpp imageplugin.cpp
 
 libdimgcanvas_la_LIBADD  = $(top_builddir)/digikam/libs/dimg/libdimg.la 
 
 libdimgcanvas_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TIFF) 
 
 INCLUDES= -I$(top_srcdir)/digikam/digikam \
-	      -I$(top_srcdir)/digikam/libs/dimg \
+	  -I$(top_srcdir)/digikam/libs/dimg \
+	  -I$(top_srcdir)/digikam/libs/dimg/filters \
           -I$(top_srcdir)/digikam/libs/dmetadata \
-	      -I$(top_srcdir)/digikam/libs/dimg/filters \
-	      -I$(top_srcdir)/digikam/libs/histogram \
-	      -I$(top_srcdir)/digikam/libs/threadimageio \
-	      -I$(top_srcdir)/digikam/utilities/splashscreen \
-	      $(all_includes) 
+	  -I$(top_srcdir)/digikam/libs/histogram \
+	  -I$(top_srcdir)/digikam/libs/threadimageio \
+	  -I$(top_srcdir)/digikam/utilities/splashscreen \
+	  $(all_includes) 
 
 digikaminclude_HEADERS = imageplugin.h 
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/canvas.cpp #540979:540980
@@ -49,6 +49,7 @@
 
 #include <kcursor.h>
 #include <kdebug.h>
+#include <klocale.h>
 
 // Local includes.
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #540979:540980
@@ -41,13 +41,14 @@
 // KDE includes.
 
 #include <kdebug.h>
-#include <kmessagebox.h>
 #include <kapplication.h>
+#include <klocale.h>
 
 // Local includes.
 
 #include "bcgmodifier.h"
 #include "icctransform.h"
+#include "colorcorrectiondlg.h"
 #include "undomanager.h"
 #include "undoaction.h"
 #include "iccsettingscontainer.h"
@@ -333,10 +334,13 @@
                     // To repaint image in canvas before to ask about to apply ICC profile.
                     emit signalImageLoaded(d->filename, valRet);
                     
-                    if (KMessageBox::questionYesNo(kapp->activeWindow(), message) == KMessageBox::Yes)
+                    DImg preview = d->image.smoothScale(240, 180, QSize::ScaleMin);
+                    trans.setProfiles(QFile::encodeName(d->cmSettings->inputSetting),
+                                      QFile::encodeName(d->cmSettings->workspaceSetting));
+                    ColorCorrectionDlg dlg(kapp->activeWindow(), &preview, &trans, message);
+                    
+                    if (dlg.exec() == QDialog::Accepted)
                     {
-                        trans.setProfiles( QFile::encodeName(d->cmSettings->inputSetting),
-                                           QFile::encodeName(d->cmSettings->workspaceSetting));
                         trans.apply( d->image );
                         d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting));
                     }
@@ -374,10 +378,14 @@
                         // To repaint image in canvas before to ask about to apply ICC profile.
                         emit signalImageLoaded(d->filename, valRet);
     
-                        if (KMessageBox::questionYesNo(kapp->activeWindow(), message) == KMessageBox::Yes)
+                        DImg preview = d->image.smoothScale(240, 180, QSize::ScaleMin);
+                        trans.setProfiles(QFile::encodeName(d->cmSettings->workspaceSetting));
+                        ColorCorrectionDlg dlg(kapp->activeWindow(), &preview, &trans, message);
+                    
+                        if (dlg.exec() == QDialog::Accepted)
                         {
-                            trans.setProfiles( QFile::encodeName(d->cmSettings->workspaceSetting));
                             trans.apply( d->image );
+                            d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting));
                         }
                     }
                 }
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.h #540979:540980
@@ -28,10 +28,6 @@
 #include <qimage.h>
 #include <qobject.h>
 
-// KDE includes.
-
-#include <klocale.h>
-
 // Locale includes.
 
 #include "dimg.h"
Comment 12 caulier.gilles 2006-05-15 15:24:29 UTC
SVN commit 541066 by cgilles:

digikam from trunk : add 2 new button on preview of ICC color correction dialog to see embedded or output ICC color profile informations.

CCMAIL: digikam-devel@kde.org, francisco.jct@gmail.com
CCBUGS: 125733

 M  +15 -7     libs/dialogs/iccprofileinfodlg.cpp  
 M  +1 -2      libs/dialogs/iccprofileinfodlg.h  
 M  +20 -0     libs/dimg/filters/icctransform.cpp  
 M  +7 -2      libs/dimg/filters/icctransform.h  
 M  +1 -0      utilities/imageeditor/canvas/Makefile.am  
 M  +28 -5     utilities/imageeditor/canvas/colorcorrectiondlg.cpp  
 M  +11 -1     utilities/imageeditor/canvas/colorcorrectiondlg.h  


--- trunk/extragear/graphics/digikam/libs/dialogs/iccprofileinfodlg.cpp #541065:541066
@@ -1,5 +1,4 @@
 /* ============================================================
- * File  : iccprofileinfodlg.cpp
  * Author: Gilles Caulier <caulier dot gilles at kdemail dot net>
  * Date  : 2006-02-16
  * Description : a dialog to display icc profile informations.
@@ -54,15 +53,21 @@
 namespace Digikam
 {
 
-ICCProfileInfoDlg::ICCProfileInfoDlg(QWidget* parent, const QString& profilePath)
+ICCProfileInfoDlg::ICCProfileInfoDlg(QWidget* parent, const QString& profilePath,
+                                     const QByteArray& profileData)
                  : KDialogBase(Plain, i18n("Color Profile Info"), Help|Ok, Ok,
                                parent, 0, true, true)
 {
     setHelp("iccprofile.anchor", "digikam");
 
     QString intent;
+    cmsHPROFILE hProfile=0;
 
-    cmsHPROFILE hProfile        = cmsOpenProfileFromFile(QFile::encodeName(profilePath), "r");
+    if (profileData.isEmpty())
+        hProfile = cmsOpenProfileFromFile(QFile::encodeName(profilePath), "r");
+    else 
+        hProfile = cmsOpenProfileFromMem(profileData.data(), (DWORD)profileData.size());
+        
     QString profileName         = QString((cmsTakeProductName(hProfile)));
     QString profileDescription  = QString((cmsTakeProductDesc(hProfile)));
     QString profileManufacturer = QString(cmsTakeCopyright(hProfile));
@@ -108,10 +113,13 @@
     grid->addMultiCellWidget(label7, 3, 3, 0, 0);
     grid->addMultiCellWidget(label8, 3, 3, 1, 1);
                                      
-    QLabel *label9  = new QLabel(i18n("<p><b>Path:</b>"), plainPage());
-    KSqueezedTextLabel *label10 = new KSqueezedTextLabel(profilePath, plainPage());
-    grid->addMultiCellWidget(label9, 4, 4, 0, 0);
-    grid->addMultiCellWidget(label10, 4, 4, 1, 1);
+    if (profileData.isEmpty())
+    {
+        QLabel *label9  = new QLabel(i18n("<p><b>Path:</b>"), plainPage());
+        KSqueezedTextLabel *label10 = new KSqueezedTextLabel(profilePath, plainPage());
+        grid->addMultiCellWidget(label9, 4, 4, 0, 0);
+        grid->addMultiCellWidget(label10, 4, 4, 1, 1);
+    }
                                      
     QLabel *label11  = new QLabel(i18n("<p><b>CIE diagram:</b>"), plainPage());
     CIETongueWidget *cieTongue = new CIETongueWidget(256, 256, plainPage());
--- trunk/extragear/graphics/digikam/libs/dialogs/iccprofileinfodlg.h #541065:541066
@@ -1,5 +1,4 @@
 /* ============================================================
- * File  : iccprofileinfodlg.h
  * Author: Gilles Caulier <caulier dot gilles at kdemail dot net>
  * Date  : 2006-02-16
  * Description : a dialog to display icc profile informations.
@@ -46,7 +45,7 @@
 
 public:
 
-    ICCProfileInfoDlg(QWidget *parent, const QString& profilePath);
+    ICCProfileInfoDlg(QWidget *parent, const QString& profilePath, const QByteArray& profileData=QByteArray());
     ~ICCProfileInfoDlg();
 
 };
--- trunk/extragear/graphics/digikam/libs/dimg/filters/icctransform.cpp #541065:541066
@@ -80,6 +80,26 @@
     return d->has_output_profile;
 }
 
+QByteArray IccTransform::embeddedProfile() const
+{
+    return d->embedded_profile;
+}
+
+QByteArray IccTransform::inputProfile() const
+{
+    return d->input_profile;
+}
+
+QByteArray IccTransform::outputProfile() const
+{
+    return d->output_profile;
+}
+
+QByteArray IccTransform::proofProfile() const
+{
+    return d->proof_profile;
+}
+
 void IccTransform::getTransformType(bool do_proof_profile)
 {
     if (do_proof_profile)
--- trunk/extragear/graphics/digikam/libs/dimg/filters/icctransform.h #541065:541066
@@ -45,12 +45,17 @@
     
     void getTransformType(bool do_proof_profile);
     void apply(DImg& image);
-    void apply(DImg& image, QByteArray& profile, int intent, bool useBPC = false, bool checkGamut = false,
-               bool useBuiltin=false);
+    void apply(DImg& image, QByteArray& profile, int intent, 
+               bool useBPC=false, bool checkGamut=false, bool useBuiltin=false);
     void getEmbeddedProfile(DImg image);
 
     int  getRenderingIntent();
     
+    QByteArray embeddedProfile() const;
+    QByteArray inputProfile() const;
+    QByteArray outputProfile() const;
+    QByteArray proofProfile() const;
+    
     //Input profile from file
     void setProfiles(QString input_profile, QString output_profile);
     void setProfiles(QString input_profile, QString output_profile, QString proof_profile);
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/Makefile.am #541065:541066
@@ -15,6 +15,7 @@
 	  -I$(top_srcdir)/digikam/libs/dimg \
 	  -I$(top_srcdir)/digikam/libs/dimg/filters \
           -I$(top_srcdir)/digikam/libs/dmetadata \
+          -I$(top_srcdir)/digikam/libs/dialogs \
 	  -I$(top_srcdir)/digikam/libs/histogram \
 	  -I$(top_srcdir)/digikam/libs/threadimageio \
 	  -I$(top_srcdir)/digikam/utilities/splashscreen \
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/colorcorrectiondlg.cpp #541065:541066
@@ -38,19 +38,24 @@
 
 #include "dimg.h"
 #include "icctransform.h"
+#include "iccprofileinfodlg.h"
 #include "colorcorrectiondlg.h"
 
 namespace Digikam
 {
 
 ColorCorrectionDlg::ColorCorrectionDlg(QWidget* parent, DImg *preview, 
-                                       IccTransform *iccTrans, const QString& msg)
-                  : KDialogBase(Plain, i18n("Applying Workspace Color Profile"), Help|Ok|Cancel, Ok,
-                                parent, 0, true, true)
+                                       IccTransform *iccTrans, const QString& msg,
+                                       bool hasEmbededProfile)
+                  : KDialogBase(Plain, i18n("Applying Workspace Color Profile"), Help|User1|User2|Ok|Cancel,
+                                Ok, parent, 0, true, true)
 {
+    m_iccTrans = iccTrans;
     setHelp("iccprofile.anchor", "digikam");
-    setButtonText(Ok, i18n("Apply Profile"));
+    setButtonText(Ok, i18n("Apply"));
     setButtonText(Cancel, i18n("Do Nothing"));
+    setButtonText(User1, i18n("Workspace Profile Info..."));
+    setButtonText(User2, i18n("Image Profile Info..."));
     
     QGridLayout* grid = new QGridLayout( plainPage(), 4, 1, 0, KDialog::spacingHint());
         
@@ -62,7 +67,7 @@
     QLabel *message         = new QLabel(msg, plainPage());
     
     previewOriginal->setPixmap(preview->convertToPixmap());
-    previewTarget->setPixmap(preview->convertToPixmap(iccTrans));
+    previewTarget->setPixmap(preview->convertToPixmap(m_iccTrans));
     KIconLoader* iconLoader = KApplication::kApplication()->iconLoader();
     logo->setPixmap(iconLoader->loadIcon("digikam", KIcon::NoGroup, 128, KIcon::DefaultState, 0, true));    
     
@@ -78,5 +83,23 @@
 {
 }
 
+void ColorCorrectionDlg::slotUser1()
+{
+    if (m_iccTrans->outputProfile().isEmpty())
+        return;
+
+    ICCProfileInfoDlg infoDlg(this, QString::null, m_iccTrans->outputProfile());
+    infoDlg.exec();
+}
+
+void ColorCorrectionDlg::slotUser2()
+{
+    if (m_iccTrans->embeddedProfile().isEmpty())
+        return;
+
+    ICCProfileInfoDlg infoDlg(this, QString::null, m_iccTrans->embeddedProfile());
+    infoDlg.exec();
+}
+
 }  // NameSpace Digikam
 
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/colorcorrectiondlg.h #541065:541066
@@ -42,9 +42,19 @@
 public:
 
     ColorCorrectionDlg(QWidget *parent, DImg *preview, 
-                       IccTransform *iccTrans, const QString& msg);
+                       IccTransform *iccTrans, const QString& msg,
+                       bool hasEmbededProfile=false);
     ~ColorCorrectionDlg();
+    
+protected slots:
+    
+    void slotUser1();
+    void slotUser2();
+    
+private: 
 
+    IccTransform *m_iccTrans;
+
 };
 
 }  // Namespace Digikam
Comment 13 caulier.gilles 2006-05-15 18:48:46 UTC
SVN commit 541151 by cgilles:

digikam from trunk : unsharp mask plugin : restore old settings from 0.8.x serie. Note : this plugin use a new algorithm based on ImageMagick implementation, not gimp !!!
CCBUGS: 125733


 M  +2 -2      imageeffect_unsharp.cpp  


--- trunk/extragear/graphics/digikamimageplugins/unsharp/imageeffect_unsharp.cpp #541150:541151
@@ -80,7 +80,7 @@
     QLabel *label1 = new QLabel(i18n("Radius:"), gboxSettings);
     
     m_radiusInput = new KIntNumInput(gboxSettings, "m_radiusInput");
-    m_radiusInput->setRange(1, 10, 1, true);
+    m_radiusInput->setRange(1, 120, 1, true);
             
     QWhatsThis::add( m_radiusInput, i18n("<p>Radius value is the gaussian blur matrix radius value "
                                          "used to determines how much to blur the image.") );
@@ -93,7 +93,7 @@
     
     m_amountInput = new KDoubleNumInput(gboxSettings, "m_amountInput");
     m_amountInput->setPrecision(1);
-    m_amountInput->setRange(0.0, 3.0, 0.1, true);
+    m_amountInput->setRange(0.0, 5.0, 0.1, true);
             
     QWhatsThis::add( m_amountInput, i18n("<p>The value of the difference between the "
                      "original and the blur image that is added back into the original.") );