[Digikam-devel] extragear/graphics/digikam/utilities
Gilles Caulier
caulier.gilles at free.fr
Fri May 12 09:11:06 BST 2006
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 at kde.org, francisco.jct at gmail.com, gerhard at 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);
More information about the Digikam-devel
mailing list