[Digikam-devel] [Bug 125733] Enabling 'Always apply ICM profiles' can lead to suprising results
Gilles Caulier
caulier.gilles at free.fr
Mon May 15 10:21:21 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=125733
------- Additional Comments From caulier.gilles free fr 2006-05-15 11:21 -------
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"
More information about the Digikam-devel
mailing list