| 1 |
/** =========================================================== |
| 2 |
* @file |
| 3 |
* |
| 4 |
* This file is a part of digiKam project |
| 5 |
* <a href="https://www.digikam.org">https://www.digikam.org</a> |
| 6 |
* |
| 7 |
* @date 2006-09-13 |
| 8 |
* @brief LibRaw settings widgets |
| 9 |
* |
| 10 |
* @author Copyright (C) 2006-2015 by Gilles Caulier |
| 11 |
* <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a> |
| 12 |
* @author Copyright (C) 2006-2011 by Marcel Wiesweg |
| 13 |
* <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot wiesweg at gmx dot de</a> |
| 14 |
* @author Copyright (C) 2007-2008 by Guillaume Castagnino |
| 15 |
* <a href="mailto:casta at xwing dot info">casta at xwing dot info</a> |
| 16 |
* |
| 17 |
* This program is free software; you can redistribute it |
| 18 |
* and/or modify it under the terms of the GNU General |
| 19 |
* Public License as published by the Free Software Foundation; |
| 20 |
* either version 2, or (at your option) |
| 21 |
* any later version. |
| 22 |
* |
| 23 |
* This program is distributed in the hope that it will be useful, |
| 24 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 25 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 26 |
* GNU General Public License for more details. |
| 27 |
* |
| 28 |
* ============================================================ */ |
| 29 |
|
| 30 |
#define OPTIONFIXCOLORSHIGHLIGHTSENTRY "FixColorsHighlights" |
| 31 |
#define OPTIONDECODESIXTEENBITENTRY "SixteenBitsImage" |
| 32 |
#define OPTIONWHITEBALANCEENTRY "White Balance" |
| 33 |
#define OPTIONCUSTOMWHITEBALANCEENTRY "Custom White Balance" |
| 34 |
#define OPTIONCUSTOMWBGREENENTRY "Custom White Balance Green" |
| 35 |
#define OPTIONFOURCOLORRGBENTRY "Four Color RGB" |
| 36 |
#define OPTIONUNCLIPCOLORSENTRY "Unclip Color" |
| 37 |
// Wrong spelling, but do not fix it since it is a configuration key |
| 38 |
// krazy:cond=spelling |
| 39 |
#define OPTIONDONTSTRETCHPIXELSENTRY "Dont Stretch Pixels" |
| 40 |
// krazy:endcond=spelling |
| 41 |
#define OPTIONMEDIANFILTERPASSESENTRY "Median Filter Passes" |
| 42 |
#define OPTIONNOISEREDUCTIONTYPEENTRY "Noise Reduction Type" |
| 43 |
#define OPTIONNOISEREDUCTIONTHRESHOLDENTRY "Noise Reduction Threshold" |
| 44 |
#define OPTIONUSECACORRECTIONENTRY "EnableCACorrection" |
| 45 |
#define OPTIONCAREDMULTIPLIERENTRY "caRedMultiplier" |
| 46 |
#define OPTIONCABLUEMULTIPLIERENTRY "caBlueMultiplier" |
| 47 |
#define OPTIONAUTOBRIGHTNESSENTRY "AutoBrightness" |
| 48 |
#define OPTIONDECODINGQUALITYENTRY "Decoding Quality" |
| 49 |
#define OPTIONINPUTCOLORSPACEENTRY "Input Color Space" |
| 50 |
#define OPTIONOUTPUTCOLORSPACEENTRY "Output Color Space" |
| 51 |
#define OPTIONINPUTCOLORPROFILEENTRY "Input Color Profile" |
| 52 |
#define OPTIONOUTPUTCOLORPROFILEENTRY "Output Color Profile" |
| 53 |
#define OPTIONBRIGHTNESSMULTIPLIERENTRY "Brightness Multiplier" |
| 54 |
#define OPTIONUSEBLACKPOINTENTRY "Use Black Point" |
| 55 |
#define OPTIONBLACKPOINTENTRY "Black Point" |
| 56 |
#define OPTIONUSEWHITEPOINTENTRY "Use White Point" |
| 57 |
#define OPTIONWHITEPOINTENTRY "White Point" |
| 58 |
|
| 59 |
//-- Extended demosaicing settings ---------------------------------------------------------- |
| 60 |
|
| 61 |
#define OPTIONDCBITERATIONSENTRY "Dcb Iterations" |
| 62 |
#define OPTIONDCBENHANCEFLENTRY "Dcb Enhance Filter" |
| 63 |
#define OPTIONEECIREFINEENTRY "Eeci Refine" |
| 64 |
#define OPTIONESMEDPASSESENTRY "Es Median Filter Passes" |
| 65 |
#define OPTIONNRCHROMINANCETHRESHOLDENTRY "Noise Reduction Chrominance Threshold" |
| 66 |
#define OPTIONEXPOCORRECTIONENTRY "Expo Correction" |
| 67 |
#define OPTIONEXPOCORRECTIONSHIFTENTRY "Expo Correction Shift" |
| 68 |
#define OPTIONEXPOCORRECTIONHIGHLIGHTENTRY "Expo Correction Highlight" |
| 69 |
|
| 70 |
#include "dcrawsettingswidget.h" |
| 71 |
|
| 72 |
// C++ includes |
| 73 |
|
| 74 |
#include <cmath> |
| 75 |
|
| 76 |
// Qt includes |
| 77 |
|
| 78 |
#include <QCheckBox> |
| 79 |
#include <QLabel> |
| 80 |
#include <QWhatsThis> |
| 81 |
#include <QGridLayout> |
| 82 |
#include <QApplication> |
| 83 |
#include <QStyle> |
| 84 |
#include <QStandardPaths> |
| 85 |
|
| 86 |
// KDE includes |
| 87 |
|
| 88 |
#include <klocalizedstring.h> |
| 89 |
|
| 90 |
// Local includes |
| 91 |
|
| 92 |
#include "kdcraw.h" |
| 93 |
#include "rnuminput.h" |
| 94 |
#include "rcombobox.h" |
| 95 |
#include "rexpanderbox.h" |
| 96 |
#include "libkdcraw_debug.h" |
| 97 |
|
| 98 |
#include <kis_icon_utils.h> |
| 99 |
|
| 100 |
namespace KDcrawIface |
| 101 |
{ |
| 102 |
|
| 103 |
class Q_DECL_HIDDEN DcrawSettingsWidget::Private |
| 104 |
{ |
| 105 |
public: |
| 106 |
|
| 107 |
Private() |
| 108 |
{ |
| 109 |
autoBrightnessBox = 0; |
| 110 |
sixteenBitsImage = 0; |
| 111 |
fourColorCheckBox = 0; |
| 112 |
brightnessLabel = 0; |
| 113 |
brightnessSpinBox = 0; |
| 114 |
blackPointCheckBox = 0; |
| 115 |
blackPointSpinBox = 0; |
| 116 |
whitePointCheckBox = 0; |
| 117 |
whitePointSpinBox = 0; |
| 118 |
whiteBalanceComboBox = 0; |
| 119 |
whiteBalanceLabel = 0; |
| 120 |
customWhiteBalanceSpinBox = 0; |
| 121 |
customWhiteBalanceLabel = 0; |
| 122 |
customWhiteBalanceGreenSpinBox = 0; |
| 123 |
customWhiteBalanceGreenLabel = 0; |
| 124 |
unclipColorLabel = 0; |
| 125 |
dontStretchPixelsCheckBox = 0; |
| 126 |
RAWQualityComboBox = 0; |
| 127 |
RAWQualityLabel = 0; |
| 128 |
noiseReductionComboBox = 0; |
| 129 |
NRSpinBox1 = 0; |
| 130 |
NRSpinBox2 = 0; |
| 131 |
NRLabel1 = 0; |
| 132 |
NRLabel2 = 0; |
| 133 |
enableCACorrectionBox = 0; |
| 134 |
autoCACorrectionBox = 0; |
| 135 |
caRedMultSpinBox = 0; |
| 136 |
caBlueMultSpinBox = 0; |
| 137 |
caRedMultLabel = 0; |
| 138 |
caBlueMultLabel = 0; |
| 139 |
unclipColorComboBox = 0; |
| 140 |
reconstructLabel = 0; |
| 141 |
reconstructSpinBox = 0; |
| 142 |
outputColorSpaceLabel = 0; |
| 143 |
outputColorSpaceComboBox = 0; |
| 144 |
demosaicingSettings = 0; |
| 145 |
whiteBalanceSettings = 0; |
| 146 |
correctionsSettings = 0; |
| 147 |
colormanSettings = 0; |
| 148 |
medianFilterPassesSpinBox = 0; |
| 149 |
medianFilterPassesLabel = 0; |
| 150 |
inIccUrlEdit = 0; |
| 151 |
outIccUrlEdit = 0; |
| 152 |
inputColorSpaceLabel = 0; |
| 153 |
inputColorSpaceComboBox = 0; |
| 154 |
fixColorsHighlightsBox = 0; |
| 155 |
refineInterpolationBox = 0; |
| 156 |
noiseReductionLabel = 0; |
| 157 |
expoCorrectionBox = 0; |
| 158 |
expoCorrectionShiftSpinBox = 0; |
| 159 |
expoCorrectionHighlightSpinBox = 0; |
| 160 |
expoCorrectionShiftLabel = 0; |
| 161 |
expoCorrectionHighlightLabel = 0; |
| 162 |
} |
| 163 |
|
| 164 |
/** Convert Exposure correction shift E.V value from GUI to Linear value needs by libraw decoder. |
| 165 |
*/ |
| 166 |
double shiftExpoFromEvToLinear(double ev) const |
| 167 |
{ |
| 168 |
// From GUI : -2.0EV => 0.25 |
| 169 |
// +3.0EV => 8.00 |
| 170 |
return (1.55*ev + 3.35); |
| 171 |
} |
| 172 |
|
| 173 |
/** Convert Exposure correction shift Linear value from liraw decoder to E.V value needs by GUI. |
| 174 |
*/ |
| 175 |
double shiftExpoFromLinearToEv(double lin) const |
| 176 |
{ |
| 177 |
// From GUI : 0.25 => -2.0EV |
| 178 |
// 8.00 => +3.0EV |
| 179 |
return ((lin-3.35) / 1.55); |
| 180 |
} |
| 181 |
|
| 182 |
public: |
| 183 |
|
| 184 |
QWidget* demosaicingSettings; |
| 185 |
QWidget* whiteBalanceSettings; |
| 186 |
QWidget* correctionsSettings; |
| 187 |
QWidget* colormanSettings; |
| 188 |
|
| 189 |
QLabel* whiteBalanceLabel; |
| 190 |
QLabel* customWhiteBalanceLabel; |
| 191 |
QLabel* customWhiteBalanceGreenLabel; |
| 192 |
QLabel* brightnessLabel; |
| 193 |
QLabel* RAWQualityLabel; |
| 194 |
QLabel* NRLabel1; |
| 195 |
QLabel* NRLabel2; |
| 196 |
QLabel* caRedMultLabel; |
| 197 |
QLabel* caBlueMultLabel; |
| 198 |
QLabel* unclipColorLabel; |
| 199 |
QLabel* reconstructLabel; |
| 200 |
QLabel* inputColorSpaceLabel; |
| 201 |
QLabel* outputColorSpaceLabel; |
| 202 |
QLabel* medianFilterPassesLabel; |
| 203 |
QLabel* noiseReductionLabel; |
| 204 |
QLabel* expoCorrectionShiftLabel; |
| 205 |
QLabel* expoCorrectionHighlightLabel; |
| 206 |
|
| 207 |
QCheckBox* blackPointCheckBox; |
| 208 |
QCheckBox* whitePointCheckBox; |
| 209 |
QCheckBox* sixteenBitsImage; |
| 210 |
QCheckBox* autoBrightnessBox; |
| 211 |
QCheckBox* fourColorCheckBox; |
| 212 |
QCheckBox* dontStretchPixelsCheckBox; |
| 213 |
QCheckBox* enableCACorrectionBox; |
| 214 |
QCheckBox* autoCACorrectionBox; |
| 215 |
QCheckBox* fixColorsHighlightsBox; |
| 216 |
QCheckBox* refineInterpolationBox; |
| 217 |
QCheckBox* expoCorrectionBox; |
| 218 |
|
| 219 |
RFileSelector* inIccUrlEdit; |
| 220 |
RFileSelector* outIccUrlEdit; |
| 221 |
|
| 222 |
RComboBox* noiseReductionComboBox; |
| 223 |
RComboBox* whiteBalanceComboBox; |
| 224 |
RComboBox* RAWQualityComboBox; |
| 225 |
RComboBox* unclipColorComboBox; |
| 226 |
RComboBox* inputColorSpaceComboBox; |
| 227 |
RComboBox* outputColorSpaceComboBox; |
| 228 |
|
| 229 |
RIntNumInput* customWhiteBalanceSpinBox; |
| 230 |
RIntNumInput* reconstructSpinBox; |
| 231 |
RIntNumInput* blackPointSpinBox; |
| 232 |
RIntNumInput* whitePointSpinBox; |
| 233 |
RIntNumInput* NRSpinBox1; |
| 234 |
RIntNumInput* NRSpinBox2; |
| 235 |
RIntNumInput* medianFilterPassesSpinBox; |
| 236 |
|
| 237 |
RDoubleNumInput* customWhiteBalanceGreenSpinBox; |
| 238 |
RDoubleNumInput* caRedMultSpinBox; |
| 239 |
RDoubleNumInput* caBlueMultSpinBox; |
| 240 |
RDoubleNumInput* brightnessSpinBox; |
| 241 |
RDoubleNumInput* expoCorrectionShiftSpinBox; |
| 242 |
RDoubleNumInput* expoCorrectionHighlightSpinBox; |
| 243 |
}; |
| 244 |
|
| 245 |
DcrawSettingsWidget::DcrawSettingsWidget(QWidget* const parent, int advSettings) |
| 246 |
: RExpanderBox(parent), d(new Private) |
| 247 |
{ |
| 248 |
setup(advSettings); |
| 249 |
} |
| 250 |
|
| 251 |
void DcrawSettingsWidget::setup(int advSettings) |
| 252 |
{ |
| 253 |
setObjectName( QLatin1String("DCRawSettings Expander" )); |
| 254 |
|
| 255 |
// --------------------------------------------------------------- |
| 256 |
// DEMOSAICING Settings panel |
| 257 |
|
| 258 |
d->demosaicingSettings = new QWidget(this); |
| 259 |
QGridLayout* const demosaicingLayout = new QGridLayout(d->demosaicingSettings); |
| 260 |
|
| 261 |
int line = 0; |
| 262 |
|
| 263 |
d->sixteenBitsImage = new QCheckBox(i18nc("@option:check", "16 bits color depth"), d->demosaicingSettings); |
| 264 |
d->sixteenBitsImage->setToolTip(i18nc("@info:whatsthis", "<p>If enabled, all RAW files will " |
| 265 |
"be decoded in 16-bit color depth using a linear gamma curve. To " |
| 266 |
"prevent dark picture rendering in the editor, it is recommended to " |
| 267 |
"use Color Management in this mode.</p>" |
| 268 |
"<p>If disabled, all RAW files will be decoded in 8-bit color " |
| 269 |
"depth with a BT.709 gamma curve and a 99th-percentile white point. " |
| 270 |
"This mode is faster than 16-bit decoding.</p>")); |
| 271 |
demosaicingLayout->addWidget(d->sixteenBitsImage, 0, 0, 1, 2); |
| 272 |
|
| 273 |
if (advSettings & SIXTEENBITS) |
| 274 |
{ |
| 275 |
d->sixteenBitsImage->show(); |
| 276 |
line = 1; |
| 277 |
} |
| 278 |
else |
| 279 |
{ |
| 280 |
d->sixteenBitsImage->hide(); |
| 281 |
} |
| 282 |
|
| 283 |
d->fourColorCheckBox = new QCheckBox(i18nc("@option:check", "Interpolate RGB as four colors"), d->demosaicingSettings); |
| 284 |
d->fourColorCheckBox->setToolTip(i18nc("@info:whatsthis", "<title>Interpolate RGB as four " |
| 285 |
"colors</title>" |
| 286 |
"<p>The default is to assume that all green pixels are the same. " |
| 287 |
"If even-row green pixels are more sensitive to ultraviolet light " |
| 288 |
"than odd-row this difference causes a mesh pattern in the output; " |
| 289 |
"using this option solves this problem with minimal loss of detail.</p>" |
| 290 |
"<p>To resume, this option blurs the image a little, but it " |
| 291 |
"eliminates false 2x2 mesh patterns with VNG quality method or " |
| 292 |
"mazes with AHD quality method.</p>")); |
| 293 |
demosaicingLayout->addWidget(d->fourColorCheckBox, line, 0, 1, line == 0 ? 2 : 3); |
| 294 |
line++; |
| 295 |
|
| 296 |
QLabel* const dcrawVersion = new QLabel(d->demosaicingSettings); |
| 297 |
dcrawVersion->setAlignment(Qt::AlignRight); |
| 298 |
dcrawVersion->setToolTip(i18nc("@info:tooltip", "Visit LibRaw project website")); |
| 299 |
dcrawVersion->setOpenExternalLinks(true); |
| 300 |
dcrawVersion->setTextFormat(Qt::RichText); |
| 301 |
dcrawVersion->setTextInteractionFlags(Qt::LinksAccessibleByMouse); |
| 302 |
dcrawVersion->setText(QString::fromLatin1("<a href=\"%1\">%2</a>") |
| 303 |
.arg(QLatin1String("https://www.libraw.org")) |
| 304 |
.arg(QString::fromLatin1("libraw %1").arg(KDcraw::librawVersion()))); |
| 305 |
|
| 306 |
demosaicingLayout->addWidget(dcrawVersion, 0, 2, 1, 1); |
| 307 |
|
| 308 |
d->dontStretchPixelsCheckBox = new QCheckBox(i18nc("@option:check", "Do not stretch or rotate pixels"), d->demosaicingSettings); |
| 309 |
d->dontStretchPixelsCheckBox->setToolTip(i18nc("@info:whatsthis", |
| 310 |
"<title>Do not stretch or rotate pixels</title>" |
| 311 |
"<p>For Fuji Super CCD cameras, show the image tilted 45 degrees. " |
| 312 |
"For cameras with non-square pixels, do not stretch the image to " |
| 313 |
"its correct aspect ratio. In any case, this option guarantees that " |
| 314 |
"each output pixel corresponds to one RAW pixel.</p>")); |
| 315 |
demosaicingLayout->addWidget(d->dontStretchPixelsCheckBox, line, 0, 1, 3); |
| 316 |
line++; |
| 317 |
|
| 318 |
d->RAWQualityLabel = new QLabel(i18nc("@label:listbox", "Quality:"), d->demosaicingSettings); |
| 319 |
d->RAWQualityComboBox = new RComboBox(d->demosaicingSettings); |
| 320 |
|
| 321 |
// Original dcraw demosaicing methods |
| 322 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::BILINEAR, i18nc("@item:inlistbox Quality", "Bilinear")); |
| 323 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::VNG, i18nc("@item:inlistbox Quality", "VNG")); |
| 324 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::PPG, i18nc("@item:inlistbox Quality", "PPG")); |
| 325 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::AHD, i18nc("@item:inlistbox Quality", "AHD")); |
| 326 |
|
| 327 |
// Extended demosaicing method from GPL2 pack |
| 328 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::DCB, i18nc("@item:inlistbox Quality", "DCB")); |
| 329 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::PL_AHD, i18nc("@item:inlistbox Quality", "AHD v2")); |
| 330 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::AFD, i18nc("@item:inlistbox Quality", "AFD")); |
| 331 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::VCD, i18nc("@item:inlistbox Quality", "VCD")); |
| 332 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::VCD_AHD, i18nc("@item:inlistbox Quality", "VCD & AHD")); |
| 333 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::LMMSE, i18nc("@item:inlistbox Quality", "LMMSE")); |
| 334 |
// Extended demosaicing method from GPL3 pack |
| 335 |
d->RAWQualityComboBox->insertItem(RawDecodingSettings::AMAZE, i18nc("@item:inlistbox Quality", "AMaZE")); |
| 336 |
|
| 337 |
// If Libraw do not support GPL2 pack, disable entries relevant. |
| 338 |
if (!KDcraw::librawUseGPL2DemosaicPack()) |
| 339 |
{ |
| 340 |
for (int i=RawDecodingSettings::DCB ; i <=RawDecodingSettings::LMMSE ; ++i) |
| 341 |
d->RAWQualityComboBox->combo()->setItemData(i, false, Qt::UserRole-1); |
| 342 |
} |
| 343 |
|
| 344 |
// If Libraw do not support GPL3 pack, disable entries relevant. |
| 345 |
if (!KDcraw::librawUseGPL3DemosaicPack()) |
| 346 |
{ |
| 347 |
d->RAWQualityComboBox->combo()->setItemData(RawDecodingSettings::AMAZE, false, Qt::UserRole-1); |
| 348 |
} |
| 349 |
|
| 350 |
d->RAWQualityComboBox->setDefaultIndex(RawDecodingSettings::BILINEAR); |
| 351 |
d->RAWQualityComboBox->setCurrentIndex(RawDecodingSettings::BILINEAR); |
| 352 |
d->RAWQualityComboBox->setToolTip(i18nc("@info:whatsthis", "<title>Quality (interpolation)</title>" |
| 353 |
"<p>Select here the demosaicing method to use when decoding RAW " |
| 354 |
"images. A demosaicing algorithm is a digital image process used to " |
| 355 |
"interpolate a complete image from the partial raw data received " |
| 356 |
"from the color-filtered image sensor, internal to many digital " |
| 357 |
"cameras, in form of a matrix of colored pixels. Also known as CFA " |
| 358 |
"interpolation or color reconstruction, another common spelling is " |
| 359 |
"demosaicing. The following methods are available for demosaicing " |
| 360 |
"RAW images:</p>" |
| 361 |
|
| 362 |
// Original dcraw demosaicing methods |
| 363 |
|
| 364 |
"<p><ul><li><emphasis strong='true'>Bilinear</emphasis>: use " |
| 365 |
"high-speed but low-quality bilinear interpolation (default - for " |
| 366 |
"slow computers). In this method, the red value of a non-red pixel " |
| 367 |
"is computed as the average of the adjacent red pixels, and similarly " |
| 368 |
"for blue and green.</li>" |
| 369 |
|
| 370 |
"<li><emphasis strong='true'>VNG</emphasis>: use Variable Number " |
| 371 |
"of Gradients interpolation. This method computes gradients near " |
| 372 |
"the pixel of interest and uses the lower gradients (representing " |
| 373 |
"smoother and more similar parts of the image) to make an estimate.</li>" |
| 374 |
|
| 375 |
"<li><emphasis strong='true'>PPG</emphasis>: use Patterned-Pixel-" |
| 376 |
"Grouping interpolation. Pixel Grouping uses assumptions about " |
| 377 |
"natural scenery in making estimates. It has fewer color artifacts " |
| 378 |
"on natural images than the Variable Number of Gradients method.</li>" |
| 379 |
|
| 380 |
"<li><emphasis strong='true'>AHD</emphasis>: use Adaptive " |
| 381 |
"Homogeneity-Directed interpolation. This method selects the " |
| 382 |
"direction of interpolation so as to maximize a homogeneity metric, " |
| 383 |
"thus typically minimizing color artifacts.</li>" |
| 384 |
|
| 385 |
// Extended demosaicing method |
| 386 |
|
| 387 |
"<li><emphasis strong='true'>DCB</emphasis>: DCB interpolation from " |
| 388 |
"linuxphoto.org project.</li>" |
| 389 |
|
| 390 |
"<li><emphasis strong='true'>AHD v2</emphasis>: modified AHD " |
| 391 |
"interpolation using Variance of Color Differences method.</li>" |
| 392 |
|
| 393 |
"<li><emphasis strong='true'>AFD</emphasis>: Adaptive Filtered " |
| 394 |
"Demosaicing interpolation through 5 pass median filter from PerfectRaw " |
| 395 |
"project.</li>" |
| 396 |
|
| 397 |
"<li><emphasis strong='true'>VCD</emphasis>: Variance of Color " |
| 398 |
"Differences interpolation.</li>" |
| 399 |
|
| 400 |
"<li><emphasis strong='true'>VCD & AHD</emphasis>: Mixed demosaicing " |
| 401 |
"between VCD and AHD.</li>" |
| 402 |
|
| 403 |
"<li><emphasis strong='true'>LMMSE</emphasis>: color demosaicing via " |
| 404 |
"directional linear minimum mean-square error estimation interpolation " |
| 405 |
"from PerfectRaw.</li>" |
| 406 |
|
| 407 |
"<li><emphasis strong='true'>AMaZE</emphasis>: Aliasing Minimization " |
| 408 |
"interpolation and Zipper Elimination to apply color aberration removal " |
| 409 |
"from RawTherapee project.</li></ul></p>" |
| 410 |
|
| 411 |
"<p>Note: some methods can be unavailable if RAW decoder have been built " |
| 412 |
"without extension packs.</p>")); |
| 413 |
|
| 414 |
demosaicingLayout->addWidget(d->RAWQualityLabel, line, 0, 1, 1); |
| 415 |
demosaicingLayout->addWidget(d->RAWQualityComboBox, line, 1, 1, 2); |
| 416 |
line++; |
| 417 |
|
| 418 |
d->medianFilterPassesSpinBox = new RIntNumInput(d->demosaicingSettings); |
| 419 |
d->medianFilterPassesSpinBox->setRange(0, 10, 1); |
| 420 |
d->medianFilterPassesSpinBox->setDefaultValue(0); |
| 421 |
d->medianFilterPassesLabel = new QLabel(i18nc("@label:slider", "Pass:"), d->whiteBalanceSettings); |
| 422 |
d->medianFilterPassesSpinBox->setToolTip( i18nc("@info:whatsthis", "<title>Pass</title>" |
| 423 |
"<p>Set here the passes used by the median filter applied after " |
| 424 |
"interpolation to Red-Green and Blue-Green channels.</p>" |
| 425 |
"<p>This setting is only available for specific Quality options: " |
| 426 |
"<emphasis strong='true'>Bilinear</emphasis>, <emphasis strong='true'>" |
| 427 |
"VNG</emphasis>, <emphasis strong='true'>PPG</emphasis>, " |
| 428 |
"<emphasis strong='true'>AHD</emphasis>, <emphasis strong='true'>" |
| 429 |
"DCB</emphasis>, and <emphasis strong='true'>VCD & AHD</emphasis>.</p>")); |
| 430 |
demosaicingLayout->addWidget(d->medianFilterPassesLabel, line, 0, 1, 1); |
| 431 |
demosaicingLayout->addWidget(d->medianFilterPassesSpinBox, line, 1, 1, 2); |
| 432 |
line++; |
| 433 |
|
| 434 |
d->refineInterpolationBox = new QCheckBox(i18nc("@option:check", "Refine interpolation"), d->demosaicingSettings); |
| 435 |
d->refineInterpolationBox->setToolTip(i18nc("@info:whatsthis", "<title>Refine interpolation</title>" |
| 436 |
"<p>This setting is available only for few Quality options:</p>" |
| 437 |
"<p><ul><li><emphasis strong='true'>DCB</emphasis>: turn on " |
| 438 |
"the enhance interpolated colors filter.</li>" |
| 439 |
"<li><emphasis strong='true'>VCD & AHD</emphasis>: turn on the " |
| 440 |
"enhanced effective color interpolation (EECI) refine to improve " |
| 441 |
"sharpness.</li></ul></p>")); |
| 442 |
demosaicingLayout->addWidget(d->refineInterpolationBox, line, 0, 1, 2); |
| 443 |
|
| 444 |
// If Libraw do not support GPL2 pack, disable options relevant. |
| 445 |
if (!KDcraw::librawUseGPL2DemosaicPack()) |
| 446 |
{ |
| 447 |
d->medianFilterPassesLabel->setEnabled(false); |
| 448 |
d->medianFilterPassesSpinBox->setEnabled(false); |
| 449 |
d->refineInterpolationBox->setEnabled(false); |
| 450 |
} |
| 451 |
|
| 452 |
addItem(d->demosaicingSettings, KisIconUtils::loadIcon("kdcraw").pixmap(16, 16), i18nc("@label", "Demosaicing"), QString("demosaicing"), true); |
| 453 |
|
| 454 |
// --------------------------------------------------------------- |
| 455 |
// WHITE BALANCE Settings Panel |
| 456 |
|
| 457 |
d->whiteBalanceSettings = new QWidget(this); |
| 458 |
QGridLayout* const whiteBalanceLayout = new QGridLayout(d->whiteBalanceSettings); |
| 459 |
|
| 460 |
d->whiteBalanceLabel = new QLabel(i18nc("@label:listbox", "Method:"), d->whiteBalanceSettings); |
| 461 |
d->whiteBalanceComboBox = new RComboBox(d->whiteBalanceSettings); |
| 462 |
d->whiteBalanceComboBox->insertItem(RawDecodingSettings::NONE, i18nc("@item:inlistbox", "Default D65")); |
| 463 |
d->whiteBalanceComboBox->insertItem(RawDecodingSettings::CAMERA, i18nc("@item:inlistbox", "Camera")); |
| 464 |
d->whiteBalanceComboBox->insertItem(RawDecodingSettings::AUTO, i18nc("@item:inlistbox set while balance automatically", "Automatic")); |
| 465 |
d->whiteBalanceComboBox->insertItem(RawDecodingSettings::CUSTOM, i18nc("@item:inlistbox set white balance manually", "Manual")); |
| 466 |
d->whiteBalanceComboBox->setDefaultIndex(RawDecodingSettings::CAMERA); |
| 467 |
d->whiteBalanceComboBox->setToolTip(i18nc("@info:whatsthis", "<title>White Balance</title>" |
| 468 |
"<p>Configure the raw white balance:</p>" |
| 469 |
"<p><ul><li><emphasis strong='true'>Default D65</emphasis>: " |
| 470 |
"Use a standard daylight D65 white balance.</li>" |
| 471 |
"<li><emphasis strong='true'>Camera</emphasis>: Use the white " |
| 472 |
"balance specified by the camera. If not available, reverts to " |
| 473 |
"default neutral white balance.</li>" |
| 474 |
"<li><emphasis strong='true'>Automatic</emphasis>: Calculates an " |
| 475 |
"automatic white balance averaging the entire image.</li>" |
| 476 |
"<li><emphasis strong='true'>Manual</emphasis>: Set a custom " |
| 477 |
"temperature and green level values.</li></ul></p>")); |
| 478 |
|
| 479 |
d->customWhiteBalanceSpinBox = new RIntNumInput(d->whiteBalanceSettings); |
| 480 |
d->customWhiteBalanceSpinBox->setRange(2000, 12000, 10); |
| 481 |
d->customWhiteBalanceSpinBox->setDefaultValue(6500); |
| 482 |
d->customWhiteBalanceLabel = new QLabel(i18nc("@label:slider", "T(K):"), d->whiteBalanceSettings); |
| 483 |
d->customWhiteBalanceSpinBox->setToolTip( i18nc("@info:whatsthis", "<title>Temperature</title>" |
| 484 |
"<p>Set here the color temperature in Kelvin.</p>")); |
| 485 |
|
| 486 |
d->customWhiteBalanceGreenSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); |
| 487 |
d->customWhiteBalanceGreenSpinBox->setDecimals(2); |
| 488 |
d->customWhiteBalanceGreenSpinBox->setRange(0.2, 2.5, 0.01); |
| 489 |
d->customWhiteBalanceGreenSpinBox->setDefaultValue(1.0); |
| 490 |
d->customWhiteBalanceGreenLabel = new QLabel(i18nc("@label:slider Green component", "Green:"), d->whiteBalanceSettings); |
| 491 |
d->customWhiteBalanceGreenSpinBox->setToolTip(i18nc("@info:whatsthis", "<p>Set here the " |
| 492 |
"green component to set magenta color cast removal level.</p>")); |
| 493 |
|
| 494 |
d->unclipColorLabel = new QLabel(i18nc("@label:listbox", "Highlights:"), d->whiteBalanceSettings); |
| 495 |
d->unclipColorComboBox = new RComboBox(d->whiteBalanceSettings); |
| 496 |
d->unclipColorComboBox->insertItem(0, i18nc("@item:inlistbox", "Solid white")); |
| 497 |
d->unclipColorComboBox->insertItem(1, i18nc("@item:inlistbox", "Unclip")); |
| 498 |
d->unclipColorComboBox->insertItem(2, i18nc("@item:inlistbox", "Blend")); |
| 499 |
d->unclipColorComboBox->insertItem(3, i18nc("@item:inlistbox", "Rebuild")); |
| 500 |
d->unclipColorComboBox->setDefaultIndex(0); |
| 501 |
d->unclipColorComboBox->setToolTip(i18nc("@info:whatsthis", "<title>Highlights</title>" |
| 502 |
"<p>Select here the highlight clipping method:</p>" |
| 503 |
"<p><ul><li><emphasis strong='true'>Solid white</emphasis>: " |
| 504 |
"clip all highlights to solid white</li>" |
| 505 |
"<li><emphasis strong='true'>Unclip</emphasis>: leave highlights " |
| 506 |
"unclipped in various shades of pink</li>" |
| 507 |
"<li><emphasis strong='true'>Blend</emphasis>:Blend clipped and " |
| 508 |
"unclipped values together for a gradual fade to white</li>" |
| 509 |
"<li><emphasis strong='true'>Rebuild</emphasis>: reconstruct " |
| 510 |
"highlights using a level value</li></ul></p>")); |
| 511 |
|
| 512 |
d->reconstructLabel = new QLabel(i18nc("@label:slider Highlight reconstruct level", "Level:"), d->whiteBalanceSettings); |
| 513 |
d->reconstructSpinBox = new RIntNumInput(d->whiteBalanceSettings); |
| 514 |
d->reconstructSpinBox->setRange(0, 6, 1); |
| 515 |
d->reconstructSpinBox->setDefaultValue(0); |
| 516 |
d->reconstructSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Level</title>" |
| 517 |
"<p>Specify the reconstruct highlight level. Low values favor " |
| 518 |
"whites and high values favor colors.</p>")); |
| 519 |
|
| 520 |
d->expoCorrectionBox = new QCheckBox(i18nc("@option:check", "Exposure Correction (E.V)"), d->whiteBalanceSettings); |
| 521 |
d->expoCorrectionBox->setToolTip(i18nc("@info:whatsthis", "<p>Turn on the exposure " |
| 522 |
"correction before interpolation.</p>")); |
| 523 |
|
| 524 |
d->expoCorrectionShiftLabel = new QLabel(i18nc("@label:slider", "Linear Shift:"), d->whiteBalanceSettings); |
| 525 |
d->expoCorrectionShiftSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); |
| 526 |
d->expoCorrectionShiftSpinBox->setDecimals(2); |
| 527 |
d->expoCorrectionShiftSpinBox->setRange(-2.0, 3.0, 0.01); |
| 528 |
d->expoCorrectionShiftSpinBox->setDefaultValue(0.0); |
| 529 |
d->expoCorrectionShiftSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Shift</title>" |
| 530 |
"<p>Linear Shift of exposure correction before interpolation in E.V</p>")); |
| 531 |
|
| 532 |
d->expoCorrectionHighlightLabel = new QLabel(i18nc("@label:slider", "Highlight:"), d->whiteBalanceSettings); |
| 533 |
d->expoCorrectionHighlightSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); |
| 534 |
d->expoCorrectionHighlightSpinBox->setDecimals(2); |
| 535 |
d->expoCorrectionHighlightSpinBox->setRange(0.0, 1.0, 0.01); |
| 536 |
d->expoCorrectionHighlightSpinBox->setDefaultValue(0.0); |
| 537 |
d->expoCorrectionHighlightSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Highlight</title>" |
| 538 |
"<p>Amount of highlight preservation for exposure correction " |
| 539 |
"before interpolation in E.V. Only take effect if Shift Correction is > 1.0 E.V</p>")); |
| 540 |
|
| 541 |
d->fixColorsHighlightsBox = new QCheckBox(i18nc("@option:check", "Correct false colors in highlights"), d->whiteBalanceSettings); |
| 542 |
d->fixColorsHighlightsBox->setToolTip(i18nc("@info:whatsthis", "<p>If enabled, images with " |
| 543 |
"overblown channels are processed much more accurately, without " |
| 544 |
"'pink clouds' (and blue highlights under tungsten lamps).</p>")); |
| 545 |
|
| 546 |
d->autoBrightnessBox = new QCheckBox(i18nc("@option:check", "Auto Brightness"), d->whiteBalanceSettings); |
| 547 |
d->autoBrightnessBox->setToolTip(i18nc("@info:whatsthis", "<p>If disable, use a fixed white level " |
| 548 |
"and ignore the image histogram to adjust brightness.</p>")); |
| 549 |
|
| 550 |
d->brightnessLabel = new QLabel(i18nc("@label:slider", "Brightness:"), d->whiteBalanceSettings); |
| 551 |
d->brightnessSpinBox = new RDoubleNumInput(d->whiteBalanceSettings); |
| 552 |
d->brightnessSpinBox->setDecimals(2); |
| 553 |
d->brightnessSpinBox->setRange(0.0, 10.0, 0.01); |
| 554 |
d->brightnessSpinBox->setDefaultValue(1.0); |
| 555 |
d->brightnessSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Brightness</title>" |
| 556 |
"<p>Specify the brightness level of output image. The default " |
| 557 |
"value is 1.0 (works in 8-bit mode only).</p>")); |
| 558 |
|
| 559 |
if (! (advSettings & POSTPROCESSING)) |
| 560 |
{ |
| 561 |
d->brightnessLabel->hide(); |
| 562 |
d->brightnessSpinBox->hide(); |
| 563 |
} |
| 564 |
|
| 565 |
d->blackPointCheckBox = new QCheckBox(i18nc("@option:check Black point", "Black:"), d->whiteBalanceSettings); |
| 566 |
d->blackPointCheckBox->setToolTip(i18nc("@info:whatsthis", "<title>Black point</title>" |
| 567 |
"<p>Use a specific black point value to decode RAW pictures. If " |
| 568 |
"you set this option to off, the Black Point value will be " |
| 569 |
"automatically computed.</p>")); |
| 570 |
d->blackPointSpinBox = new RIntNumInput(d->whiteBalanceSettings); |
| 571 |
d->blackPointSpinBox->setRange(0, 1000, 1); |
| 572 |
d->blackPointSpinBox->setDefaultValue(0); |
| 573 |
d->blackPointSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Black point value</title>" |
| 574 |
"<p>Specify specific black point value of the output image.</p>")); |
| 575 |
|
| 576 |
d->whitePointCheckBox = new QCheckBox(i18nc("@option:check White point", "White:"), d->whiteBalanceSettings); |
| 577 |
d->whitePointCheckBox->setToolTip(i18nc("@info:whatsthis", "<title>White point</title>" |
| 578 |
"<p>Use a specific white point value to decode RAW pictures. If " |
| 579 |
"you set this option to off, the White Point value will be " |
| 580 |
"automatically computed.</p>")); |
| 581 |
d->whitePointSpinBox = new RIntNumInput(d->whiteBalanceSettings); |
| 582 |
d->whitePointSpinBox->setRange(0, 20000, 1); |
| 583 |
d->whitePointSpinBox->setDefaultValue(0); |
| 584 |
d->whitePointSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>White point value</title>" |
| 585 |
"<p>Specify specific white point value of the output image.</p>")); |
| 586 |
|
| 587 |
if (! (advSettings & BLACKWHITEPOINTS)) |
| 588 |
{ |
| 589 |
d->blackPointCheckBox->hide(); |
| 590 |
d->blackPointSpinBox->hide(); |
| 591 |
d->whitePointCheckBox->hide(); |
| 592 |
d->whitePointSpinBox->hide(); |
| 593 |
} |
| 594 |
|
| 595 |
whiteBalanceLayout->addWidget(d->whiteBalanceLabel, 0, 0, 1, 1); |
| 596 |
whiteBalanceLayout->addWidget(d->whiteBalanceComboBox, 0, 1, 1, 2); |
| 597 |
whiteBalanceLayout->addWidget(d->customWhiteBalanceLabel, 1, 0, 1, 1); |
| 598 |
whiteBalanceLayout->addWidget(d->customWhiteBalanceSpinBox, 1, 1, 1, 2); |
| 599 |
whiteBalanceLayout->addWidget(d->customWhiteBalanceGreenLabel, 2, 0, 1, 1); |
| 600 |
whiteBalanceLayout->addWidget(d->customWhiteBalanceGreenSpinBox, 2, 1, 1, 2); |
| 601 |
whiteBalanceLayout->addWidget(d->unclipColorLabel, 3, 0, 1, 1); |
| 602 |
whiteBalanceLayout->addWidget(d->unclipColorComboBox, 3, 1, 1, 2); |
| 603 |
whiteBalanceLayout->addWidget(d->reconstructLabel, 4, 0, 1, 1); |
| 604 |
whiteBalanceLayout->addWidget(d->reconstructSpinBox, 4, 1, 1, 2); |
| 605 |
whiteBalanceLayout->addWidget(d->expoCorrectionBox, 5, 0, 1, 2); |
| 606 |
whiteBalanceLayout->addWidget(d->expoCorrectionShiftLabel, 6, 0, 1, 1); |
| 607 |
whiteBalanceLayout->addWidget(d->expoCorrectionShiftSpinBox, 6, 1, 1, 2); |
| 608 |
whiteBalanceLayout->addWidget(d->expoCorrectionHighlightLabel, 7, 0, 1, 1); |
| 609 |
whiteBalanceLayout->addWidget(d->expoCorrectionHighlightSpinBox, 7, 1, 1, 2); |
| 610 |
whiteBalanceLayout->addWidget(d->fixColorsHighlightsBox, 8, 0, 1, 3); |
| 611 |
whiteBalanceLayout->addWidget(d->autoBrightnessBox, 9, 0, 1, 3); |
| 612 |
whiteBalanceLayout->addWidget(d->brightnessLabel, 10, 0, 1, 1); |
| 613 |
whiteBalanceLayout->addWidget(d->brightnessSpinBox, 10, 1, 1, 2); |
| 614 |
whiteBalanceLayout->addWidget(d->blackPointCheckBox, 11, 0, 1, 1); |
| 615 |
whiteBalanceLayout->addWidget(d->blackPointSpinBox, 11, 1, 1, 2); |
| 616 |
whiteBalanceLayout->addWidget(d->whitePointCheckBox, 12, 0, 1, 1); |
| 617 |
whiteBalanceLayout->addWidget(d->whitePointSpinBox, 12, 1, 1, 2); |
| 618 |
|
| 619 |
const int styleSpacing = QApplication::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing); |
| 620 |
whiteBalanceLayout->setSpacing(styleSpacing); |
| 621 |
whiteBalanceLayout->setContentsMargins(styleSpacing, styleSpacing, styleSpacing, styleSpacing); |
| 622 |
|
| 623 |
addItem(d->whiteBalanceSettings, KisIconUtils::loadIcon("kdcraw").pixmap(16, 16), i18nc("@label", "White Balance"), QString("whitebalance"), true); |
| 624 |
|
| 625 |
// --------------------------------------------------------------- |
| 626 |
// CORRECTIONS Settings panel |
| 627 |
|
| 628 |
d->correctionsSettings = new QWidget(this); |
| 629 |
QGridLayout* const correctionsLayout = new QGridLayout(d->correctionsSettings); |
| 630 |
|
| 631 |
d->noiseReductionLabel = new QLabel(i18nc("@label:listbox", "Noise reduction:"), d->correctionsSettings); |
| 632 |
d->noiseReductionComboBox = new RComboBox(d->colormanSettings); |
| 633 |
d->noiseReductionComboBox->insertItem(RawDecodingSettings::NONR, i18nc("@item:inlistbox Noise Reduction", "None")); |
| 634 |
d->noiseReductionComboBox->insertItem(RawDecodingSettings::WAVELETSNR, i18nc("@item:inlistbox Noise Reduction", "Wavelets")); |
| 635 |
d->noiseReductionComboBox->insertItem(RawDecodingSettings::FBDDNR, i18nc("@item:inlistbox Noise Reduction", "FBDD")); |
| 636 |
d->noiseReductionComboBox->insertItem(RawDecodingSettings::LINENR, i18nc("@item:inlistbox Noise Reduction", "CFA Line Denoise")); |
| 637 |
d->noiseReductionComboBox->insertItem(RawDecodingSettings::IMPULSENR, i18nc("@item:inlistbox Noise Reduction", "Impulse Denoise")); |
| 638 |
d->noiseReductionComboBox->setDefaultIndex(RawDecodingSettings::NONR); |
| 639 |
d->noiseReductionComboBox->setToolTip(i18nc("@info:whatsthis", "<title>Noise Reduction</title>" |
| 640 |
"<p>Select here the noise reduction method to apply during RAW " |
| 641 |
"decoding.</p>" |
| 642 |
"<p><ul><li><emphasis strong='true'>None</emphasis>: no " |
| 643 |
"noise reduction.</li>" |
| 644 |
"<li><emphasis strong='true'>Wavelets</emphasis>: wavelets " |
| 645 |
"correction to erase noise while preserving real detail. It's " |
| 646 |
"applied after interpolation.</li>" |
| 647 |
"<li><emphasis strong='true'>FBDD</emphasis>: Fake Before " |
| 648 |
"Demosaicing Denoising noise reduction. It's applied before " |
| 649 |
"interpolation.</li>" |
| 650 |
"<li><emphasis strong='true'>CFA Line Denoise</emphasis>: Banding " |
| 651 |
"noise suppression. It's applied after interpolation.</li>" |
| 652 |
"<li><emphasis strong='true'>Impulse Denoise</emphasis>: Impulse " |
| 653 |
"noise suppression. It's applied after interpolation.</li></ul></p>")); |
| 654 |
|
| 655 |
d->NRSpinBox1 = new RIntNumInput(d->correctionsSettings); |
| 656 |
d->NRSpinBox1->setRange(100, 1000, 1); |
| 657 |
d->NRSpinBox1->setDefaultValue(100); |
| 658 |
d->NRLabel1 = new QLabel(d->correctionsSettings); |
| 659 |
|
| 660 |
d->NRSpinBox2 = new RIntNumInput(d->correctionsSettings); |
| 661 |
d->NRSpinBox2->setRange(100, 1000, 1); |
| 662 |
d->NRSpinBox2->setDefaultValue(100); |
| 663 |
d->NRLabel2 = new QLabel(d->correctionsSettings); |
| 664 |
|
| 665 |
d->enableCACorrectionBox = new QCheckBox(i18nc("@option:check", "Enable Chromatic Aberration correction"), d->correctionsSettings); |
| 666 |
d->enableCACorrectionBox->setToolTip(i18nc("@info:whatsthis", "<title>Enable Chromatic " |
| 667 |
"Aberration correction</title>" |
| 668 |
"<p>Enlarge the raw red-green and blue-yellow axis by the given " |
| 669 |
"factors (automatic by default).</p>")); |
| 670 |
|
| 671 |
d->autoCACorrectionBox = new QCheckBox(i18nc("@option:check", "Automatic color axis adjustments"), d->correctionsSettings); |
| 672 |
d->autoCACorrectionBox->setToolTip(i18nc("@info:whatsthis", "<title>Automatic Chromatic " |
| 673 |
"Aberration correction</title>" |
| 674 |
"<p>If this option is turned on, it will try to shift image " |
| 675 |
"channels slightly and evaluate Chromatic Aberration change. Note " |
| 676 |
"that if you shot blue-red pattern, the method may fail. In this " |
| 677 |
"case, disable this option and tune manually color factors.</p>")); |
| 678 |
|
| 679 |
d->caRedMultLabel = new QLabel(i18nc("@label:slider", "Red-Green:"), d->correctionsSettings); |
| 680 |
d->caRedMultSpinBox = new RDoubleNumInput(d->correctionsSettings); |
| 681 |
d->caRedMultSpinBox->setDecimals(1); |
| 682 |
d->caRedMultSpinBox->setRange(-4.0, 4.0, 0.1); |
| 683 |
d->caRedMultSpinBox->setDefaultValue(0.0); |
| 684 |
d->caRedMultSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Red-Green multiplier</title>" |
| 685 |
"<p>Set here the amount of correction on red-green axis</p>")); |
| 686 |
|
| 687 |
d->caBlueMultLabel = new QLabel(i18nc("@label:slider", "Blue-Yellow:"), d->correctionsSettings); |
| 688 |
d->caBlueMultSpinBox = new RDoubleNumInput(d->correctionsSettings); |
| 689 |
d->caBlueMultSpinBox->setDecimals(1); |
| 690 |
d->caBlueMultSpinBox->setRange(-4.0, 4.0, 0.1); |
| 691 |
d->caBlueMultSpinBox->setDefaultValue(0.0); |
| 692 |
d->caBlueMultSpinBox->setToolTip(i18nc("@info:whatsthis", "<title>Blue-Yellow multiplier</title>" |
| 693 |
"<p>Set here the amount of correction on blue-yellow axis</p>")); |
| 694 |
|
| 695 |
correctionsLayout->addWidget(d->noiseReductionLabel, 0, 0, 1, 1); |
| 696 |
correctionsLayout->addWidget(d->noiseReductionComboBox, 0, 1, 1, 2); |
| 697 |
correctionsLayout->addWidget(d->NRLabel1, 1, 0, 1, 1); |
| 698 |
correctionsLayout->addWidget(d->NRSpinBox1, 1, 1, 1, 2); |
| 699 |
correctionsLayout->addWidget(d->NRLabel2, 2, 0, 1, 1); |
| 700 |
correctionsLayout->addWidget(d->NRSpinBox2, 2, 1, 1, 2); |
| 701 |
correctionsLayout->addWidget(d->enableCACorrectionBox, 3, 0, 1, 3); |
| 702 |
correctionsLayout->addWidget(d->autoCACorrectionBox, 4, 0, 1, 3); |
| 703 |
correctionsLayout->addWidget(d->caRedMultLabel, 5, 0, 1, 1); |
| 704 |
correctionsLayout->addWidget(d->caRedMultSpinBox, 5, 1, 1, 2); |
| 705 |
correctionsLayout->addWidget(d->caBlueMultLabel, 6, 0, 1, 1); |
| 706 |
correctionsLayout->addWidget(d->caBlueMultSpinBox, 6, 1, 1, 2); |
| 707 |
|
| 708 |
correctionsLayout->setRowStretch(7, 10); |
| 709 |
correctionsLayout->setSpacing(styleSpacing); |
| 710 |
correctionsLayout->setContentsMargins(styleSpacing, styleSpacing, styleSpacing, styleSpacing); |
| 711 |
|
| 712 |
addItem(d->correctionsSettings, KisIconUtils::loadIcon("kdcraw").pixmap(16, 16), i18nc("@label", "Corrections"), QString("corrections"), false); |
| 713 |
|
| 714 |
// --------------------------------------------------------------- |
| 715 |
// COLOR MANAGEMENT Settings panel |
| 716 |
|
| 717 |
d->colormanSettings = new QWidget(this); |
| 718 |
QGridLayout* const colormanLayout = new QGridLayout(d->colormanSettings); |
| 719 |
|
| 720 |
d->inputColorSpaceLabel = new QLabel(i18nc("@label:listbox", "Camera Profile:"), d->colormanSettings); |
| 721 |
d->inputColorSpaceComboBox = new RComboBox(d->colormanSettings); |
| 722 |
d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::NOINPUTCS, i18nc("@item:inlistbox Camera Profile", "None")); |
| 723 |
d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::EMBEDDED, i18nc("@item:inlistbox Camera Profile", "Embedded")); |
| 724 |
d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::CUSTOMINPUTCS, i18nc("@item:inlistbox Camera Profile", "Custom")); |
| 725 |
d->inputColorSpaceComboBox->setDefaultIndex(RawDecodingSettings::NOINPUTCS); |
| 726 |
d->inputColorSpaceComboBox->setToolTip(i18nc("@info:whatsthis", "<title>Camera Profile</title>" |
| 727 |
"<p>Select here the input color space used to decode RAW data.</p>" |
| 728 |
"<p><ul><li><emphasis strong='true'>None</emphasis>: no " |
| 729 |
"input color profile is used during RAW decoding.</li>" |
| 730 |
"<li><emphasis strong='true'>Embedded</emphasis>: use embedded " |
| 731 |
"color profile from RAW file, if it exists.</li>" |
| 732 |
"<li><emphasis strong='true'>Custom</emphasis>: use a custom " |
| 733 |
"input color space profile.</li></ul></p>")); |
| 734 |
|
| 735 |
d->inIccUrlEdit = new RFileSelector(d->colormanSettings); |
| 736 |
d->inIccUrlEdit->setFileDlgMode(QFileDialog::ExistingFile); |
| 737 |
d->inIccUrlEdit->setFileDlgFilter(i18n("ICC Files (*.icc; *.icm)")); |
| 738 |
|
| 739 |
d->outputColorSpaceLabel = new QLabel(i18nc("@label:listbox", "Workspace:"), d->colormanSettings); |
| 740 |
d->outputColorSpaceComboBox = new RComboBox( d->colormanSettings ); |
| 741 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::RAWCOLOR, i18nc("@item:inlistbox Workspace", "Raw (no profile)")); |
| 742 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::SRGB, i18nc("@item:inlistbox Workspace", "sRGB")); |
| 743 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::ADOBERGB, i18nc("@item:inlistbox Workspace", "Adobe RGB")); |
| 744 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::WIDEGAMMUT, i18nc("@item:inlistbox Workspace", "Wide Gamut")); |
| 745 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::PROPHOTO, i18nc("@item:inlistbox Workspace", "Pro-Photo")); |
| 746 |
d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::CUSTOMOUTPUTCS, i18nc("@item:inlistbox Workspace", "Custom")); |
| 747 |
d->outputColorSpaceComboBox->setDefaultIndex(RawDecodingSettings::SRGB); |
| 748 |
d->outputColorSpaceComboBox->setToolTip(i18nc("@info:whatsthis", "<title>Workspace</title>" |
| 749 |
"<p>Select here the output color space used to decode RAW data.</p>" |
| 750 |
"<p><ul><li><emphasis strong='true'>Raw (no profile)</emphasis>: " |
| 751 |
"in this mode, no output color space is used during RAW decoding.</li>" |
| 752 |
"<li><emphasis strong='true'>sRGB</emphasis>: this is an RGB " |
| 753 |
"color space, created cooperatively by Hewlett-Packard and " |
| 754 |
"Microsoft. It is the best choice for images destined for the Web " |
| 755 |
"and portrait photography.</li>" |
| 756 |
"<li><emphasis strong='true'>Adobe RGB</emphasis>: this color " |
| 757 |
"space is an extended RGB color space, developed by Adobe. It is " |
| 758 |
"used for photography applications such as advertising and fine " |
| 759 |
"art.</li>" |
| 760 |
"<li><emphasis strong='true'>Wide Gamut</emphasis>: this color " |
| 761 |
"space is an expanded version of the Adobe RGB color space.</li>" |
| 762 |
"<li><emphasis strong='true'>Pro-Photo</emphasis>: this color " |
| 763 |
"space is an RGB color space, developed by Kodak, that offers an " |
| 764 |
"especially large gamut designed for use with photographic outputs " |
| 765 |
"in mind.</li>" |
| 766 |
"<li><emphasis strong='true'>Custom</emphasis>: use a custom " |
| 767 |
"output color space profile.</li></ul></p>")); |
| 768 |
|
| 769 |
d->outIccUrlEdit = new RFileSelector(d->colormanSettings); |
| 770 |
d->outIccUrlEdit->setFileDlgMode(QFileDialog::ExistingFile); |
| 771 |
d->outIccUrlEdit->setFileDlgFilter(i18n("ICC Files (*.icc *.icm)")); |
| 772 |
|
| 773 |
colormanLayout->addWidget(d->inputColorSpaceLabel, 0, 0, 1, 1); |
| 774 |
colormanLayout->addWidget(d->inputColorSpaceComboBox, 0, 1, 1, 2); |
| 775 |
colormanLayout->addWidget(d->inIccUrlEdit, 1, 0, 1, 3); |
| 776 |
colormanLayout->addWidget(d->outputColorSpaceLabel, 2, 0, 1, 1); |
| 777 |
colormanLayout->addWidget(d->outputColorSpaceComboBox, 2, 1, 1, 2); |
| 778 |
colormanLayout->addWidget(d->outIccUrlEdit, 3, 0, 1, 3); |
| 779 |
colormanLayout->setRowStretch(4, 10); |
| 780 |
colormanLayout->setSpacing(styleSpacing); |
| 781 |
colormanLayout->setContentsMargins(styleSpacing, styleSpacing, styleSpacing, styleSpacing); |
| 782 |
|
| 783 |
addItem(d->colormanSettings, KisIconUtils::loadIcon("kdcraw").pixmap(16, 16), i18nc("@label", "Color Management"), QString("colormanagement"), false); |
| 784 |
|
| 785 |
if (! (advSettings & COLORSPACE)) |
| 786 |
removeItem(COLORMANAGEMENT); |
| 787 |
|
| 788 |
addStretch(); |
| 789 |
|
| 790 |
// --------------------------------------------------------------- |
| 791 |
|
| 792 |
connect(d->unclipColorComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 793 |
this, &DcrawSettingsWidget::slotUnclipColorActivated); |
| 794 |
|
| 795 |
connect(d->whiteBalanceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 796 |
this, &DcrawSettingsWidget::slotWhiteBalanceToggled); |
| 797 |
|
| 798 |
connect(d->noiseReductionComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 799 |
this, &DcrawSettingsWidget::slotNoiseReductionChanged); |
| 800 |
|
| 801 |
connect(d->enableCACorrectionBox, &QCheckBox::toggled, |
| 802 |
this, &DcrawSettingsWidget::slotCACorrectionToggled); |
| 803 |
|
| 804 |
connect(d->autoCACorrectionBox, &QCheckBox::toggled, |
| 805 |
this, &DcrawSettingsWidget::slotAutoCAToggled); |
| 806 |
|
| 807 |
connect(d->blackPointCheckBox, SIGNAL(toggled(bool)), |
| 808 |
d->blackPointSpinBox, SLOT(setEnabled(bool))); |
| 809 |
|
| 810 |
connect(d->whitePointCheckBox, SIGNAL(toggled(bool)), |
| 811 |
d->whitePointSpinBox, SLOT(setEnabled(bool))); |
| 812 |
|
| 813 |
connect(d->sixteenBitsImage, &QCheckBox::toggled, |
| 814 |
this, &DcrawSettingsWidget::slotsixteenBitsImageToggled); |
| 815 |
|
| 816 |
connect(d->inputColorSpaceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 817 |
this, &DcrawSettingsWidget::slotInputColorSpaceChanged); |
| 818 |
|
| 819 |
connect(d->outputColorSpaceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 820 |
this, &DcrawSettingsWidget::slotOutputColorSpaceChanged); |
| 821 |
|
| 822 |
connect(d->expoCorrectionBox, &QCheckBox::toggled, |
| 823 |
this, &DcrawSettingsWidget::slotExposureCorrectionToggled); |
| 824 |
|
| 825 |
connect(d->expoCorrectionShiftSpinBox, &RDoubleNumInput::valueChanged, |
| 826 |
this, &DcrawSettingsWidget::slotExpoCorrectionShiftChanged); |
| 827 |
|
| 828 |
// Wrapper to Q_EMIT signal when something is changed in settings. |
| 829 |
|
| 830 |
connect(d->inIccUrlEdit->lineEdit(), &QLineEdit::textChanged, |
| 831 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 832 |
|
| 833 |
connect(d->outIccUrlEdit->lineEdit(), &QLineEdit::textChanged, |
| 834 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 835 |
|
| 836 |
connect(d->whiteBalanceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 837 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 838 |
|
| 839 |
connect(d->RAWQualityComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 840 |
this, &DcrawSettingsWidget::slotRAWQualityChanged); |
| 841 |
|
| 842 |
connect(d->unclipColorComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 843 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 844 |
|
| 845 |
connect(d->inputColorSpaceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 846 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 847 |
|
| 848 |
connect(d->outputColorSpaceComboBox, static_cast<void (RComboBox::*)(int)>(&RComboBox::activated), |
| 849 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 850 |
|
| 851 |
connect(d->blackPointCheckBox, &QCheckBox::toggled, |
| 852 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 853 |
|
| 854 |
connect(d->whitePointCheckBox, &QCheckBox::toggled, |
| 855 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 856 |
|
| 857 |
connect(d->sixteenBitsImage, &QCheckBox::toggled, |
| 858 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 859 |
|
| 860 |
connect(d->fixColorsHighlightsBox, &QCheckBox::toggled, |
| 861 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 862 |
|
| 863 |
connect(d->autoBrightnessBox, &QCheckBox::toggled, |
| 864 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 865 |
|
| 866 |
connect(d->fourColorCheckBox, &QCheckBox::toggled, |
| 867 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 868 |
|
| 869 |
connect(d->dontStretchPixelsCheckBox, &QCheckBox::toggled, |
| 870 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 871 |
|
| 872 |
connect(d->refineInterpolationBox, &QCheckBox::toggled, |
| 873 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 874 |
|
| 875 |
connect(d->customWhiteBalanceSpinBox, &RIntNumInput::valueChanged, |
| 876 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 877 |
|
| 878 |
connect(d->reconstructSpinBox, &RIntNumInput::valueChanged, |
| 879 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 880 |
|
| 881 |
connect(d->blackPointSpinBox, &RIntNumInput::valueChanged, |
| 882 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 883 |
|
| 884 |
connect(d->whitePointSpinBox, &RIntNumInput::valueChanged, |
| 885 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 886 |
|
| 887 |
connect(d->NRSpinBox1, &RIntNumInput::valueChanged, |
| 888 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 889 |
|
| 890 |
connect(d->NRSpinBox2, &RIntNumInput::valueChanged, |
| 891 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 892 |
|
| 893 |
connect(d->medianFilterPassesSpinBox, &RIntNumInput::valueChanged, |
| 894 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 895 |
|
| 896 |
connect(d->customWhiteBalanceGreenSpinBox, &RDoubleNumInput::valueChanged, |
| 897 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 898 |
|
| 899 |
connect(d->caRedMultSpinBox, &RDoubleNumInput::valueChanged, |
| 900 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 901 |
|
| 902 |
connect(d->caBlueMultSpinBox, &RDoubleNumInput::valueChanged, |
| 903 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 904 |
|
| 905 |
connect(d->brightnessSpinBox, &RDoubleNumInput::valueChanged, |
| 906 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 907 |
|
| 908 |
connect(d->expoCorrectionHighlightSpinBox, &RDoubleNumInput::valueChanged, |
| 909 |
this, &DcrawSettingsWidget::signalSettingsChanged); |
| 910 |
} |
| 911 |
|
| 912 |
DcrawSettingsWidget::~DcrawSettingsWidget() |
| 913 |
{ |
| 914 |
delete d; |
| 915 |
} |
| 916 |
|
| 917 |
void DcrawSettingsWidget::updateMinimumWidth() |
| 918 |
{ |
| 919 |
int width = 0; |
| 920 |
|
| 921 |
for (int i = 0; i < count(); i++) |
| 922 |
{ |
| 923 |
if (widget(i)->width() > width) |
| 924 |
width = widget(i)->width(); |
| 925 |
} |
| 926 |
|
| 927 |
setMinimumWidth(width); |
| 928 |
} |
| 929 |
|
| 930 |
RFileSelector* DcrawSettingsWidget::inputProfileUrlEdit() const |
| 931 |
{ |
| 932 |
return d->inIccUrlEdit; |
| 933 |
} |
| 934 |
|
| 935 |
RFileSelector* DcrawSettingsWidget::outputProfileUrlEdit() const |
| 936 |
{ |
| 937 |
return d->outIccUrlEdit; |
| 938 |
} |
| 939 |
|
| 940 |
void DcrawSettingsWidget::resetToDefault() |
| 941 |
{ |
| 942 |
setSettings(RawDecodingSettings()); |
| 943 |
} |
| 944 |
|
| 945 |
void DcrawSettingsWidget::slotsixteenBitsImageToggled(bool b) |
| 946 |
{ |
| 947 |
setEnabledBrightnessSettings(!b); |
| 948 |
Q_EMIT signalSixteenBitsImageToggled(d->sixteenBitsImage->isChecked()); |
| 949 |
} |
| 950 |
|
| 951 |
void DcrawSettingsWidget::slotWhiteBalanceToggled(int v) |
| 952 |
{ |
| 953 |
if (v == 3) |
| 954 |
{ |
| 955 |
d->customWhiteBalanceSpinBox->setEnabled(true); |
| 956 |
d->customWhiteBalanceGreenSpinBox->setEnabled(true); |
| 957 |
d->customWhiteBalanceLabel->setEnabled(true); |
| 958 |
d->customWhiteBalanceGreenLabel->setEnabled(true); |
| 959 |
} |
| 960 |
else |
| 961 |
{ |
| 962 |
d->customWhiteBalanceSpinBox->setEnabled(false); |
| 963 |
d->customWhiteBalanceGreenSpinBox->setEnabled(false); |
| 964 |
d->customWhiteBalanceLabel->setEnabled(false); |
| 965 |
d->customWhiteBalanceGreenLabel->setEnabled(false); |
| 966 |
} |
| 967 |
} |
| 968 |
|
| 969 |
void DcrawSettingsWidget::slotUnclipColorActivated(int v) |
| 970 |
{ |
| 971 |
if (v == 3) // Reconstruct Highlight method |
| 972 |
{ |
| 973 |
d->reconstructLabel->setEnabled(true); |
| 974 |
d->reconstructSpinBox->setEnabled(true); |
| 975 |
} |
| 976 |
else |
| 977 |
{ |
| 978 |
d->reconstructLabel->setEnabled(false); |
| 979 |
d->reconstructSpinBox->setEnabled(false); |
| 980 |
} |
| 981 |
} |
| 982 |
|
| 983 |
void DcrawSettingsWidget::slotNoiseReductionChanged(int item) |
| 984 |
{ |
| 985 |
d->NRSpinBox1->setEnabled(true); |
| 986 |
d->NRLabel1->setEnabled(true); |
| 987 |
d->NRSpinBox2->setEnabled(true); |
| 988 |
d->NRLabel2->setEnabled(true); |
| 989 |
d->NRLabel1->setText(i18nc("@label", "Threshold:")); |
| 990 |
d->NRSpinBox1->setToolTip(i18nc("@info:whatsthis", "<title>Threshold</title>" |
| 991 |
"<p>Set here the noise reduction threshold value to use.</p>")); |
| 992 |
|
| 993 |
switch(item) |
| 994 |
{ |
| 995 |
case RawDecodingSettings::WAVELETSNR: |
| 996 |
case RawDecodingSettings::FBDDNR: |
| 997 |
case RawDecodingSettings::LINENR: |
| 998 |
d->NRSpinBox2->setVisible(false); |
| 999 |
d->NRLabel2->setVisible(false); |
| 1000 |
break; |
| 1001 |
|
| 1002 |
case RawDecodingSettings::IMPULSENR: |
| 1003 |
d->NRLabel1->setText(i18nc("@label", "Luminance:")); |
| 1004 |
d->NRSpinBox1->setToolTip(i18nc("@info:whatsthis", "<title>Luminance</title>" |
| 1005 |
"<p>Amount of Luminance impulse noise reduction.</p>")); |
| 1006 |
d->NRLabel2->setText(i18nc("@label", "Chrominance:")); |
| 1007 |
d->NRSpinBox2->setToolTip(i18nc("@info:whatsthis", "<title>Chrominance</title>" |
| 1008 |
"<p>Amount of Chrominance impulse noise reduction.</p>")); |
| 1009 |
d->NRSpinBox2->setVisible(true); |
| 1010 |
d->NRLabel2->setVisible(true); |
| 1011 |
break; |
| 1012 |
|
| 1013 |
default: |
| 1014 |
d->NRSpinBox1->setEnabled(false); |
| 1015 |
d->NRLabel1->setEnabled(false); |
| 1016 |
d->NRSpinBox2->setEnabled(false); |
| 1017 |
d->NRLabel2->setEnabled(false); |
| 1018 |
d->NRSpinBox2->setVisible(false); |
| 1019 |
d->NRLabel2->setVisible(false); |
| 1020 |
break; |
| 1021 |
} |
| 1022 |
|
| 1023 |
Q_EMIT signalSettingsChanged(); |
| 1024 |
} |
| 1025 |
|
| 1026 |
void DcrawSettingsWidget::slotCACorrectionToggled(bool b) |
| 1027 |
{ |
| 1028 |
d->autoCACorrectionBox->setEnabled(b); |
| 1029 |
slotAutoCAToggled(d->autoCACorrectionBox->isChecked()); |
| 1030 |
} |
| 1031 |
|
| 1032 |
void DcrawSettingsWidget::slotAutoCAToggled(bool b) |
| 1033 |
{ |
| 1034 |
if (b) |
| 1035 |
{ |
| 1036 |
d->caRedMultSpinBox->setValue(0.0); |
| 1037 |
d->caBlueMultSpinBox->setValue(0.0); |
| 1038 |
} |
| 1039 |
|
| 1040 |
bool mult = (!b) && (d->autoCACorrectionBox->isEnabled()); |
| 1041 |
d->caRedMultSpinBox->setEnabled(mult); |
| 1042 |
d->caBlueMultSpinBox->setEnabled(mult); |
| 1043 |
d->caRedMultLabel->setEnabled(mult); |
| 1044 |
d->caBlueMultLabel->setEnabled(mult); |
| 1045 |
Q_EMIT signalSettingsChanged(); |
| 1046 |
} |
| 1047 |
|
| 1048 |
void DcrawSettingsWidget::slotExposureCorrectionToggled(bool b) |
| 1049 |
{ |
| 1050 |
d->expoCorrectionShiftLabel->setEnabled(b); |
| 1051 |
d->expoCorrectionShiftSpinBox->setEnabled(b); |
| 1052 |
d->expoCorrectionHighlightLabel->setEnabled(b); |
| 1053 |
d->expoCorrectionHighlightSpinBox->setEnabled(b); |
| 1054 |
|
| 1055 |
slotExpoCorrectionShiftChanged(d->expoCorrectionShiftSpinBox->value()); |
| 1056 |
} |
| 1057 |
|
| 1058 |
void DcrawSettingsWidget::slotExpoCorrectionShiftChanged(double ev) |
| 1059 |
{ |
| 1060 |
// Only enable Highligh exposure correction if Shift correction is >= 1.0, else this settings do not take effect. |
| 1061 |
bool b = (ev >= 1.0); |
| 1062 |
|
| 1063 |
d->expoCorrectionHighlightLabel->setEnabled(b); |
| 1064 |
d->expoCorrectionHighlightSpinBox->setEnabled(b); |
| 1065 |
|
| 1066 |
Q_EMIT signalSettingsChanged(); |
| 1067 |
} |
| 1068 |
|
| 1069 |
void DcrawSettingsWidget::slotInputColorSpaceChanged(int item) |
| 1070 |
{ |
| 1071 |
d->inIccUrlEdit->setEnabled(item == RawDecodingSettings::CUSTOMINPUTCS); |
| 1072 |
} |
| 1073 |
|
| 1074 |
void DcrawSettingsWidget::slotOutputColorSpaceChanged(int item) |
| 1075 |
{ |
| 1076 |
d->outIccUrlEdit->setEnabled(item == RawDecodingSettings::CUSTOMOUTPUTCS); |
| 1077 |
} |
| 1078 |
|
| 1079 |
void DcrawSettingsWidget::slotRAWQualityChanged(int quality) |
| 1080 |
{ |
| 1081 |
switch(quality) |
| 1082 |
{ |
| 1083 |
case RawDecodingSettings::DCB: |
| 1084 |
case RawDecodingSettings::VCD_AHD: |
| 1085 |
// These options can be only available if Libraw use GPL2 pack. |
| 1086 |
d->medianFilterPassesLabel->setEnabled(KDcraw::librawUseGPL2DemosaicPack()); |
| 1087 |
d->medianFilterPassesSpinBox->setEnabled(KDcraw::librawUseGPL2DemosaicPack()); |
| 1088 |
d->refineInterpolationBox->setEnabled(KDcraw::librawUseGPL2DemosaicPack()); |
| 1089 |
break; |
| 1090 |
|
| 1091 |
case RawDecodingSettings::PL_AHD: |
| 1092 |
case RawDecodingSettings::AFD: |
| 1093 |
case RawDecodingSettings::VCD: |
| 1094 |
case RawDecodingSettings::LMMSE: |
| 1095 |
case RawDecodingSettings::AMAZE: |
| 1096 |
d->medianFilterPassesLabel->setEnabled(false); |
| 1097 |
d->medianFilterPassesSpinBox->setEnabled(false); |
| 1098 |
d->refineInterpolationBox->setEnabled(false); |
| 1099 |
break; |
| 1100 |
|
| 1101 |
default: // BILINEAR, VNG, PPG, AHD |
| 1102 |
d->medianFilterPassesLabel->setEnabled(true); |
| 1103 |
d->medianFilterPassesSpinBox->setEnabled(true); |
| 1104 |
d->refineInterpolationBox->setEnabled(false); |
| 1105 |
break; |
| 1106 |
} |
| 1107 |
|
| 1108 |
Q_EMIT signalSettingsChanged(); |
| 1109 |
} |
| 1110 |
|
| 1111 |
void DcrawSettingsWidget::setEnabledBrightnessSettings(bool b) |
| 1112 |
{ |
| 1113 |
d->brightnessLabel->setEnabled(b); |
| 1114 |
d->brightnessSpinBox->setEnabled(b); |
| 1115 |
} |
| 1116 |
|
| 1117 |
bool DcrawSettingsWidget::brightnessSettingsIsEnabled() const |
| 1118 |
{ |
| 1119 |
return d->brightnessSpinBox->isEnabled(); |
| 1120 |
} |
| 1121 |
|
| 1122 |
void DcrawSettingsWidget::setSettings(const RawDecodingSettings& settings) |
| 1123 |
{ |
| 1124 |
d->sixteenBitsImage->setChecked(settings.sixteenBitsImage); |
| 1125 |
|
| 1126 |
switch(settings.whiteBalance) |
| 1127 |
{ |
| 1128 |
case RawDecodingSettings::CAMERA: |
| 1129 |
d->whiteBalanceComboBox->setCurrentIndex(1); |
| 1130 |
break; |
| 1131 |
case RawDecodingSettings::AUTO: |
| 1132 |
d->whiteBalanceComboBox->setCurrentIndex(2); |
| 1133 |
break; |
| 1134 |
case RawDecodingSettings::CUSTOM: |
| 1135 |
d->whiteBalanceComboBox->setCurrentIndex(3); |
| 1136 |
break; |
| 1137 |
default: |
| 1138 |
d->whiteBalanceComboBox->setCurrentIndex(0); |
| 1139 |
break; |
| 1140 |
} |
| 1141 |
slotWhiteBalanceToggled(d->whiteBalanceComboBox->currentIndex()); |
| 1142 |
|
| 1143 |
d->customWhiteBalanceSpinBox->setValue(settings.customWhiteBalance); |
| 1144 |
d->customWhiteBalanceGreenSpinBox->setValue(settings.customWhiteBalanceGreen); |
| 1145 |
d->fourColorCheckBox->setChecked(settings.RGBInterpolate4Colors); |
| 1146 |
d->autoBrightnessBox->setChecked(settings.autoBrightness); |
| 1147 |
d->fixColorsHighlightsBox->setChecked(settings.fixColorsHighlights); |
| 1148 |
|
| 1149 |
switch(settings.unclipColors) |
| 1150 |
{ |
| 1151 |
case 0: |
| 1152 |
d->unclipColorComboBox->setCurrentIndex(0); |
| 1153 |
break; |
| 1154 |
case 1: |
| 1155 |
d->unclipColorComboBox->setCurrentIndex(1); |
| 1156 |
break; |
| 1157 |
case 2: |
| 1158 |
d->unclipColorComboBox->setCurrentIndex(2); |
| 1159 |
break; |
| 1160 |
default: // Reconstruct Highlight method |
| 1161 |
d->unclipColorComboBox->setCurrentIndex(3); |
| 1162 |
d->reconstructSpinBox->setValue(settings.unclipColors-3); |
| 1163 |
break; |
| 1164 |
} |
| 1165 |
slotUnclipColorActivated(d->unclipColorComboBox->currentIndex()); |
| 1166 |
|
| 1167 |
d->dontStretchPixelsCheckBox->setChecked(settings.DontStretchPixels); |
| 1168 |
d->brightnessSpinBox->setValue(settings.brightness); |
| 1169 |
d->blackPointCheckBox->setChecked(settings.enableBlackPoint); |
| 1170 |
d->blackPointSpinBox->setEnabled(settings.enableBlackPoint); |
| 1171 |
d->blackPointSpinBox->setValue(settings.blackPoint); |
| 1172 |
d->whitePointCheckBox->setChecked(settings.enableWhitePoint); |
| 1173 |
d->whitePointSpinBox->setEnabled(settings.enableWhitePoint); |
| 1174 |
d->whitePointSpinBox->setValue(settings.whitePoint); |
| 1175 |
|
| 1176 |
int q = settings.RAWQuality; |
| 1177 |
|
| 1178 |
// If Libraw do not support GPL2 pack, reset to BILINEAR. |
| 1179 |
if (!KDcraw::librawUseGPL2DemosaicPack()) |
| 1180 |
{ |
| 1181 |
for (int i=RawDecodingSettings::DCB ; i <=RawDecodingSettings::LMMSE ; ++i) |
| 1182 |
{ |
| 1183 |
if (q == i) |
| 1184 |
{ |
| 1185 |
q = RawDecodingSettings::BILINEAR; |
| 1186 |
qCDebug(LIBKDCRAW_LOG) << "Libraw GPL2 pack not available. Raw quality set to Bilinear"; |
| 1187 |
break; |
| 1188 |
} |
| 1189 |
} |
| 1190 |
} |
| 1191 |
|
| 1192 |
// If Libraw do not support GPL3 pack, reset to BILINEAR. |
| 1193 |
if (!KDcraw::librawUseGPL3DemosaicPack() && (q == RawDecodingSettings::AMAZE)) |
| 1194 |
{ |
| 1195 |
q = RawDecodingSettings::BILINEAR; |
| 1196 |
qCDebug(LIBKDCRAW_LOG) << "Libraw GPL3 pack not available. Raw quality set to Bilinear"; |
| 1197 |
} |
| 1198 |
|
| 1199 |
d->RAWQualityComboBox->setCurrentIndex(q); |
| 1200 |
|
| 1201 |
switch(q) |
| 1202 |
{ |
| 1203 |
case RawDecodingSettings::DCB: |
| 1204 |
d->medianFilterPassesSpinBox->setValue(settings.dcbIterations); |
| 1205 |
d->refineInterpolationBox->setChecked(settings.dcbEnhanceFl); |
| 1206 |
break; |
| 1207 |
case RawDecodingSettings::VCD_AHD: |
| 1208 |
d->medianFilterPassesSpinBox->setValue(settings.eeciRefine); |
| 1209 |
d->refineInterpolationBox->setChecked(settings.eeciRefine); |
| 1210 |
break; |
| 1211 |
default: |
| 1212 |
d->medianFilterPassesSpinBox->setValue(settings.medianFilterPasses); |
| 1213 |
d->refineInterpolationBox->setChecked(false); // option not used. |
| 1214 |
break; |
| 1215 |
} |
| 1216 |
|
| 1217 |
slotRAWQualityChanged(q); |
| 1218 |
|
| 1219 |
d->inputColorSpaceComboBox->setCurrentIndex((int)settings.inputColorSpace); |
| 1220 |
slotInputColorSpaceChanged((int)settings.inputColorSpace); |
| 1221 |
d->outputColorSpaceComboBox->setCurrentIndex((int)settings.outputColorSpace); |
| 1222 |
slotOutputColorSpaceChanged((int)settings.outputColorSpace); |
| 1223 |
|
| 1224 |
d->noiseReductionComboBox->setCurrentIndex(settings.NRType); |
| 1225 |
slotNoiseReductionChanged(settings.NRType); |
| 1226 |
d->NRSpinBox1->setValue(settings.NRThreshold); |
| 1227 |
d->NRSpinBox2->setValue(settings.NRChroThreshold); |
| 1228 |
|
| 1229 |
d->enableCACorrectionBox->setChecked(settings.enableCACorrection); |
| 1230 |
d->caRedMultSpinBox->setValue(settings.caMultiplier[0]); |
| 1231 |
d->caBlueMultSpinBox->setValue(settings.caMultiplier[1]); |
| 1232 |
d->autoCACorrectionBox->setChecked((settings.caMultiplier[0] == 0.0) && (settings.caMultiplier[1] == 0.0)); |
| 1233 |
slotCACorrectionToggled(settings.enableCACorrection); |
| 1234 |
|
| 1235 |
d->expoCorrectionBox->setChecked(settings.expoCorrection); |
| 1236 |
slotExposureCorrectionToggled(settings.expoCorrection); |
| 1237 |
d->expoCorrectionShiftSpinBox->setValue(d->shiftExpoFromLinearToEv(settings.expoCorrectionShift)); |
| 1238 |
d->expoCorrectionHighlightSpinBox->setValue(settings.expoCorrectionHighlight); |
| 1239 |
|
| 1240 |
d->inIccUrlEdit->lineEdit()->setText(settings.inputProfile); |
| 1241 |
d->outIccUrlEdit->lineEdit()->setText(settings.outputProfile); |
| 1242 |
} |
| 1243 |
|
| 1244 |
RawDecodingSettings DcrawSettingsWidget::settings() const |
| 1245 |
{ |
| 1246 |
RawDecodingSettings prm; |
| 1247 |
prm.sixteenBitsImage = d->sixteenBitsImage->isChecked(); |
| 1248 |
|
| 1249 |
switch(d->whiteBalanceComboBox->currentIndex()) |
| 1250 |
{ |
| 1251 |
case 1: |
| 1252 |
prm.whiteBalance = RawDecodingSettings::CAMERA; |
| 1253 |
break; |
| 1254 |
case 2: |
| 1255 |
prm.whiteBalance = RawDecodingSettings::AUTO; |
| 1256 |
break; |
| 1257 |
case 3: |
| 1258 |
prm.whiteBalance = RawDecodingSettings::CUSTOM; |
| 1259 |
break; |
| 1260 |
default: |
| 1261 |
prm.whiteBalance = RawDecodingSettings::NONE; |
| 1262 |
break; |
| 1263 |
} |
| 1264 |
|
| 1265 |
prm.customWhiteBalance = d->customWhiteBalanceSpinBox->value(); |
| 1266 |
prm.customWhiteBalanceGreen = d->customWhiteBalanceGreenSpinBox->value(); |
| 1267 |
prm.RGBInterpolate4Colors = d->fourColorCheckBox->isChecked(); |
| 1268 |
prm.autoBrightness = d->autoBrightnessBox->isChecked(); |
| 1269 |
prm.fixColorsHighlights = d->fixColorsHighlightsBox->isChecked(); |
| 1270 |
|
| 1271 |
switch(d->unclipColorComboBox->currentIndex()) |
| 1272 |
{ |
| 1273 |
case 0: |
| 1274 |
prm.unclipColors = 0; |
| 1275 |
break; |
| 1276 |
case 1: |
| 1277 |
prm.unclipColors = 1; |
| 1278 |
break; |
| 1279 |
case 2: |
| 1280 |
prm.unclipColors = 2; |
| 1281 |
break; |
| 1282 |
default: // Reconstruct Highlight method |
| 1283 |
prm.unclipColors = d->reconstructSpinBox->value()+3; |
| 1284 |
break; |
| 1285 |
} |
| 1286 |
|
| 1287 |
prm.DontStretchPixels = d->dontStretchPixelsCheckBox->isChecked(); |
| 1288 |
prm.brightness = d->brightnessSpinBox->value(); |
| 1289 |
prm.enableBlackPoint = d->blackPointCheckBox->isChecked(); |
| 1290 |
prm.blackPoint = d->blackPointSpinBox->value(); |
| 1291 |
prm.enableWhitePoint = d->whitePointCheckBox->isChecked(); |
| 1292 |
prm.whitePoint = d->whitePointSpinBox->value(); |
| 1293 |
|
| 1294 |
prm.RAWQuality = (RawDecodingSettings::DecodingQuality)d->RAWQualityComboBox->currentIndex(); |
| 1295 |
switch(prm.RAWQuality) |
| 1296 |
{ |
| 1297 |
case RawDecodingSettings::DCB: |
| 1298 |
prm.dcbIterations = d->medianFilterPassesSpinBox->value(); |
| 1299 |
prm.dcbEnhanceFl = d->refineInterpolationBox->isChecked(); |
| 1300 |
break; |
| 1301 |
case RawDecodingSettings::VCD_AHD: |
| 1302 |
prm.esMedPasses = d->medianFilterPassesSpinBox->value(); |
| 1303 |
prm.eeciRefine = d->refineInterpolationBox->isChecked(); |
| 1304 |
break; |
| 1305 |
default: |
| 1306 |
prm.medianFilterPasses = d->medianFilterPassesSpinBox->value(); |
| 1307 |
break; |
| 1308 |
} |
| 1309 |
|
| 1310 |
prm.NRType = (RawDecodingSettings::NoiseReduction)d->noiseReductionComboBox->currentIndex(); |
| 1311 |
switch (prm.NRType) |
| 1312 |
{ |
| 1313 |
case RawDecodingSettings::NONR: |
| 1314 |
{ |
| 1315 |
prm.NRThreshold = 0; |
| 1316 |
prm.NRChroThreshold = 0; |
| 1317 |
break; |
| 1318 |
} |
| 1319 |
case RawDecodingSettings::WAVELETSNR: |
| 1320 |
case RawDecodingSettings::FBDDNR: |
| 1321 |
case RawDecodingSettings::LINENR: |
| 1322 |
{ |
| 1323 |
prm.NRThreshold = d->NRSpinBox1->value(); |
| 1324 |
prm.NRChroThreshold = 0; |
| 1325 |
break; |
| 1326 |
} |
| 1327 |
default: // IMPULSENR |
| 1328 |
{ |
| 1329 |
prm.NRThreshold = d->NRSpinBox1->value(); |
| 1330 |
prm.NRChroThreshold = d->NRSpinBox2->value(); |
| 1331 |
break; |
| 1332 |
} |
| 1333 |
} |
| 1334 |
|
| 1335 |
prm.enableCACorrection = d->enableCACorrectionBox->isChecked(); |
| 1336 |
prm.caMultiplier[0] = d->caRedMultSpinBox->value(); |
| 1337 |
prm.caMultiplier[1] = d->caBlueMultSpinBox->value(); |
| 1338 |
|
| 1339 |
prm.expoCorrection = d->expoCorrectionBox->isChecked(); |
| 1340 |
prm.expoCorrectionShift = d->shiftExpoFromEvToLinear(d->expoCorrectionShiftSpinBox->value()); |
| 1341 |
prm.expoCorrectionHighlight = d->expoCorrectionHighlightSpinBox->value(); |
| 1342 |
|
| 1343 |
prm.inputColorSpace = (RawDecodingSettings::InputColorSpace)(d->inputColorSpaceComboBox->currentIndex()); |
| 1344 |
prm.outputColorSpace = (RawDecodingSettings::OutputColorSpace)(d->outputColorSpaceComboBox->currentIndex()); |
| 1345 |
prm.inputProfile = d->inIccUrlEdit->lineEdit()->text(); |
| 1346 |
prm.outputProfile = d->outIccUrlEdit->lineEdit()->text(); |
| 1347 |
|
| 1348 |
return prm; |
| 1349 |
} |
| 1350 |
|
| 1351 |
void DcrawSettingsWidget::writeSettings(KConfigGroup& group) |
| 1352 |
{ |
| 1353 |
RawDecodingSettings prm = settings(); |
| 1354 |
{ |
| 1355 |
group.writeEntry(OPTIONFIXCOLORSHIGHLIGHTSENTRY, prm.fixColorsHighlights); |
| 1356 |
group.writeEntry(OPTIONDECODESIXTEENBITENTRY, prm.sixteenBitsImage); |
| 1357 |
group.writeEntry(OPTIONWHITEBALANCEENTRY, (int)prm.whiteBalance); |
| 1358 |
group.writeEntry(OPTIONCUSTOMWHITEBALANCEENTRY, prm.customWhiteBalance); |
| 1359 |
group.writeEntry(OPTIONCUSTOMWBGREENENTRY, prm.customWhiteBalanceGreen); |
| 1360 |
group.writeEntry(OPTIONFOURCOLORRGBENTRY, prm.RGBInterpolate4Colors); |
| 1361 |
group.writeEntry(OPTIONUNCLIPCOLORSENTRY, prm.unclipColors); |
| 1362 |
group.writeEntry(OPTIONDONTSTRETCHPIXELSENTRY, prm.DontStretchPixels); |
| 1363 |
group.writeEntry(OPTIONNOISEREDUCTIONTYPEENTRY, (int)prm.NRType); |
| 1364 |
group.writeEntry(OPTIONBRIGHTNESSMULTIPLIERENTRY, prm.brightness); |
| 1365 |
group.writeEntry(OPTIONUSEBLACKPOINTENTRY, prm.enableBlackPoint); |
| 1366 |
group.writeEntry(OPTIONBLACKPOINTENTRY, prm.blackPoint); |
| 1367 |
group.writeEntry(OPTIONUSEWHITEPOINTENTRY, prm.enableWhitePoint); |
| 1368 |
group.writeEntry(OPTIONWHITEPOINTENTRY, prm.whitePoint); |
| 1369 |
group.writeEntry(OPTIONMEDIANFILTERPASSESENTRY, prm.medianFilterPasses); |
| 1370 |
group.writeEntry(OPTIONNOISEREDUCTIONTHRESHOLDENTRY, prm.NRThreshold); |
| 1371 |
group.writeEntry(OPTIONUSECACORRECTIONENTRY, prm.enableCACorrection); |
| 1372 |
group.writeEntry(OPTIONCAREDMULTIPLIERENTRY, prm.caMultiplier[0]); |
| 1373 |
group.writeEntry(OPTIONCABLUEMULTIPLIERENTRY, prm.caMultiplier[1]); |
| 1374 |
group.writeEntry(OPTIONDECODINGQUALITYENTRY, (int)prm.RAWQuality); |
| 1375 |
group.writeEntry(OPTIONOUTPUTCOLORSPACEENTRY, (int)prm.outputColorSpace); |
| 1376 |
group.writeEntry(OPTIONAUTOBRIGHTNESSENTRY, prm.autoBrightness); |
| 1377 |
|
| 1378 |
//-- Extended demosaicing settings ---------------------------------------------------------- |
| 1379 |
|
| 1380 |
group.writeEntry(OPTIONDCBITERATIONSENTRY, prm.dcbIterations); |
| 1381 |
group.writeEntry(OPTIONDCBENHANCEFLENTRY, prm.dcbEnhanceFl); |
| 1382 |
group.writeEntry(OPTIONEECIREFINEENTRY, prm.eeciRefine); |
| 1383 |
group.writeEntry(OPTIONESMEDPASSESENTRY, prm.esMedPasses); |
| 1384 |
group.writeEntry(OPTIONNRCHROMINANCETHRESHOLDENTRY, prm.NRChroThreshold); |
| 1385 |
group.writeEntry(OPTIONEXPOCORRECTIONENTRY, prm.expoCorrection); |
| 1386 |
group.writeEntry(OPTIONEXPOCORRECTIONSHIFTENTRY, prm.expoCorrectionShift); |
| 1387 |
group.writeEntry(OPTIONEXPOCORRECTIONHIGHLIGHTENTRY, prm.expoCorrectionHighlight); |
| 1388 |
} |
| 1389 |
RExpanderBox::writeSettings(group); |
| 1390 |
} |
| 1391 |
|
| 1392 |
void DcrawSettingsWidget::readSettings(KConfigGroup& group) |
| 1393 |
{ |
| 1394 |
RawDecodingSettings prm; |
| 1395 |
{ |
| 1396 |
prm.fixColorsHighlights = group.readEntry(OPTIONFIXCOLORSHIGHLIGHTSENTRY, prm.fixColorsHighlights); |
| 1397 |
prm.sixteenBitsImage = group.readEntry(OPTIONDECODESIXTEENBITENTRY, prm.sixteenBitsImage); |
| 1398 |
prm.whiteBalance = |
| 1399 |
(RawDecodingSettings::WhiteBalance)group.readEntry(OPTIONWHITEBALANCEENTRY, (int)prm.whiteBalance); |
| 1400 |
prm.customWhiteBalance = group.readEntry(OPTIONCUSTOMWHITEBALANCEENTRY, prm.customWhiteBalance); |
| 1401 |
prm.customWhiteBalanceGreen = group.readEntry(OPTIONCUSTOMWBGREENENTRY, prm.customWhiteBalanceGreen); |
| 1402 |
prm.RGBInterpolate4Colors = group.readEntry(OPTIONFOURCOLORRGBENTRY, prm.RGBInterpolate4Colors); |
| 1403 |
prm.unclipColors = group.readEntry(OPTIONUNCLIPCOLORSENTRY, prm.unclipColors); |
| 1404 |
prm.DontStretchPixels = group.readEntry(OPTIONDONTSTRETCHPIXELSENTRY, prm.DontStretchPixels); |
| 1405 |
prm.NRType = |
| 1406 |
(RawDecodingSettings::NoiseReduction)group.readEntry(OPTIONNOISEREDUCTIONTYPEENTRY, (int)prm.NRType); |
| 1407 |
prm.brightness = group.readEntry(OPTIONBRIGHTNESSMULTIPLIERENTRY, prm.brightness); |
| 1408 |
prm.enableBlackPoint = group.readEntry(OPTIONUSEBLACKPOINTENTRY, prm.enableBlackPoint); |
| 1409 |
prm.blackPoint = group.readEntry(OPTIONBLACKPOINTENTRY, prm.blackPoint); |
| 1410 |
prm.enableWhitePoint = group.readEntry(OPTIONUSEWHITEPOINTENTRY, prm.enableWhitePoint); |
| 1411 |
prm.whitePoint = group.readEntry(OPTIONWHITEPOINTENTRY, prm.whitePoint); |
| 1412 |
prm.medianFilterPasses = group.readEntry(OPTIONMEDIANFILTERPASSESENTRY, prm.medianFilterPasses); |
| 1413 |
prm.NRThreshold = group.readEntry(OPTIONNOISEREDUCTIONTHRESHOLDENTRY, prm.NRThreshold); |
| 1414 |
prm.enableCACorrection = group.readEntry(OPTIONUSECACORRECTIONENTRY, prm.enableCACorrection); |
| 1415 |
prm.caMultiplier[0] = group.readEntry(OPTIONCAREDMULTIPLIERENTRY, prm.caMultiplier[0]); |
| 1416 |
prm.caMultiplier[1] = group.readEntry(OPTIONCABLUEMULTIPLIERENTRY, prm.caMultiplier[1]); |
| 1417 |
prm.RAWQuality = |
| 1418 |
(RawDecodingSettings::DecodingQuality)group.readEntry(OPTIONDECODINGQUALITYENTRY, (int)prm.RAWQuality); |
| 1419 |
prm.outputColorSpace = (RawDecodingSettings::OutputColorSpace)group.readEntry(OPTIONOUTPUTCOLORSPACEENTRY, |
| 1420 |
(int)prm.outputColorSpace); |
| 1421 |
prm.autoBrightness = group.readEntry(OPTIONAUTOBRIGHTNESSENTRY, prm.autoBrightness); |
| 1422 |
|
| 1423 |
//-- Extended demosaicing settings ---------------------------------------------------------- |
| 1424 |
|
| 1425 |
prm.dcbIterations = group.readEntry(OPTIONDCBITERATIONSENTRY, prm.dcbIterations); |
| 1426 |
prm.dcbEnhanceFl = group.readEntry(OPTIONDCBENHANCEFLENTRY, prm.dcbEnhanceFl); |
| 1427 |
prm.eeciRefine = group.readEntry(OPTIONEECIREFINEENTRY, prm.eeciRefine); |
| 1428 |
prm.esMedPasses = group.readEntry(OPTIONESMEDPASSESENTRY, prm.esMedPasses); |
| 1429 |
prm.NRChroThreshold = group.readEntry(OPTIONNRCHROMINANCETHRESHOLDENTRY, prm.NRChroThreshold); |
| 1430 |
prm.expoCorrection = group.readEntry(OPTIONEXPOCORRECTIONENTRY, prm.expoCorrection); |
| 1431 |
prm.expoCorrectionShift = group.readEntry(OPTIONEXPOCORRECTIONSHIFTENTRY, prm.expoCorrectionShift); |
| 1432 |
prm.expoCorrectionHighlight = |
| 1433 |
group.readEntry(OPTIONEXPOCORRECTIONHIGHLIGHTENTRY, prm.expoCorrectionHighlight); |
| 1434 |
} |
| 1435 |
setSettings(prm); |
| 1436 |
RExpanderBox::readSettings(group); |
| 1437 |
} |
| 1438 |
|
| 1439 |
} // NameSpace KDcrawIface |