253 setObjectName( QLatin1String(
"DCRawSettings Expander" ));
258 d->demosaicingSettings =
new QWidget(
this);
259 QGridLayout*
const demosaicingLayout =
new QGridLayout(
d->demosaicingSettings);
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);
275 d->sixteenBitsImage->show();
280 d->sixteenBitsImage->hide();
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 "
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);
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())));
306 demosaicingLayout->addWidget(dcrawVersion, 0, 2, 1, 1);
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);
318 d->RAWQualityLabel =
new QLabel(i18nc(
"@label:listbox",
"Quality:"),
d->demosaicingSettings);
319 d->RAWQualityComboBox =
new RComboBox(
d->demosaicingSettings);
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"));
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"));
335 d->RAWQualityComboBox->insertItem(RawDecodingSettings::AMAZE, i18nc(
"@item:inlistbox Quality",
"AMaZE"));
338 if (!KDcraw::librawUseGPL2DemosaicPack())
340 for (
int i=RawDecodingSettings::DCB ; i <=RawDecodingSettings::LMMSE ; ++i)
341 d->RAWQualityComboBox->combo()->setItemData(i,
false, Qt::UserRole-1);
345 if (!KDcraw::librawUseGPL3DemosaicPack())
347 d->RAWQualityComboBox->combo()->setItemData(RawDecodingSettings::AMAZE,
false, Qt::UserRole-1);
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 "
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>"
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>"
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>"
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>"
387 "<li><emphasis strong='true'>DCB</emphasis>: DCB interpolation from "
388 "linuxphoto.org project.</li>"
390 "<li><emphasis strong='true'>AHD v2</emphasis>: modified AHD "
391 "interpolation using Variance of Color Differences method.</li>"
393 "<li><emphasis strong='true'>AFD</emphasis>: Adaptive Filtered "
394 "Demosaicing interpolation through 5 pass median filter from PerfectRaw "
397 "<li><emphasis strong='true'>VCD</emphasis>: Variance of Color "
398 "Differences interpolation.</li>"
400 "<li><emphasis strong='true'>VCD & AHD</emphasis>: Mixed demosaicing "
401 "between VCD and AHD.</li>"
403 "<li><emphasis strong='true'>LMMSE</emphasis>: color demosaicing via "
404 "directional linear minimum mean-square error estimation interpolation "
405 "from PerfectRaw.</li>"
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>"
411 "<p>Note: some methods can be unavailable if RAW decoder have been built "
412 "without extension packs.</p>"));
414 demosaicingLayout->addWidget(
d->RAWQualityLabel, line, 0, 1, 1);
415 demosaicingLayout->addWidget(
d->RAWQualityComboBox, line, 1, 1, 2);
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);
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);
445 if (!KDcraw::librawUseGPL2DemosaicPack())
447 d->medianFilterPassesLabel->setEnabled(
false);
448 d->medianFilterPassesSpinBox->setEnabled(
false);
449 d->refineInterpolationBox->setEnabled(
false);
457 d->whiteBalanceSettings =
new QWidget(
this);
458 QGridLayout*
const whiteBalanceLayout =
new QGridLayout(
d->whiteBalanceSettings);
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>"));
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>"));
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>"));
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>"));
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>"));
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>"));
524 d->expoCorrectionShiftLabel =
new QLabel(i18nc(
"@label:slider",
"Linear Shift:"),
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>"));
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>"));
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>"));
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>"));
550 d->brightnessLabel =
new QLabel(i18nc(
"@label:slider",
"Brightness:"),
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>"));
561 d->brightnessLabel->hide();
562 d->brightnessSpinBox->hide();
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>"));
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>"));
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>"));
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>"));
589 d->blackPointCheckBox->hide();
590 d->blackPointSpinBox->hide();
591 d->whitePointCheckBox->hide();
592 d->whitePointSpinBox->hide();
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);
619 const int styleSpacing = QApplication::style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing);
620 whiteBalanceLayout->setSpacing(styleSpacing);
621 whiteBalanceLayout->setContentsMargins(styleSpacing, styleSpacing, styleSpacing, styleSpacing);
623 addItem(
d->whiteBalanceSettings,
KisIconUtils::loadIcon(
"kdcraw").pixmap(16, 16), i18nc(
"@label",
"White Balance"), QString(
"whitebalance"),
true);
628 d->correctionsSettings =
new QWidget(
this);
629 QGridLayout*
const correctionsLayout =
new QGridLayout(
d->correctionsSettings);
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 "
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>"));
656 d->NRSpinBox1->setRange(100, 1000, 1);
657 d->NRSpinBox1->setDefaultValue(100);
658 d->NRLabel1 =
new QLabel(
d->correctionsSettings);
661 d->NRSpinBox2->setRange(100, 1000, 1);
662 d->NRSpinBox2->setDefaultValue(100);
663 d->NRLabel2 =
new QLabel(
d->correctionsSettings);
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>"));
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>"));
679 d->caRedMultLabel =
new QLabel(i18nc(
"@label:slider",
"Red-Green:"),
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>"));
687 d->caBlueMultLabel =
new QLabel(i18nc(
"@label:slider",
"Blue-Yellow:"),
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>"));
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);
708 correctionsLayout->setRowStretch(7, 10);
709 correctionsLayout->setSpacing(styleSpacing);
710 correctionsLayout->setContentsMargins(styleSpacing, styleSpacing, styleSpacing, styleSpacing);
717 d->colormanSettings =
new QWidget(
this);
718 QGridLayout*
const colormanLayout =
new QGridLayout(
d->colormanSettings);
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>"));
736 d->inIccUrlEdit->setFileDlgMode(QFileDialog::ExistingFile);
737 d->inIccUrlEdit->setFileDlgFilter(i18n(
"ICC Files (*.icc; *.icm)"));
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 "
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 "
766 "<li><emphasis strong='true'>Custom</emphasis>: use a custom "
767 "output color space profile.</li></ul></p>"));
770 d->outIccUrlEdit->setFileDlgMode(QFileDialog::ExistingFile);
771 d->outIccUrlEdit->setFileDlgFilter(i18n(
"ICC Files (*.icc *.icm)"));
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);
783 addItem(
d->colormanSettings,
KisIconUtils::loadIcon(
"kdcraw").pixmap(16, 16), i18nc(
"@label",
"Color Management"), QString(
"colormanagement"),
false);
801 connect(
d->enableCACorrectionBox, &QCheckBox::toggled,
804 connect(
d->autoCACorrectionBox, &QCheckBox::toggled,
807 connect(
d->blackPointCheckBox, SIGNAL(toggled(
bool)),
808 d->blackPointSpinBox, SLOT(setEnabled(
bool)));
810 connect(
d->whitePointCheckBox, SIGNAL(toggled(
bool)),
811 d->whitePointSpinBox, SLOT(setEnabled(
bool)));
813 connect(
d->sixteenBitsImage, &QCheckBox::toggled,
822 connect(
d->expoCorrectionBox, &QCheckBox::toggled,
830 connect(
d->inIccUrlEdit->lineEdit(), &QLineEdit::textChanged,
833 connect(
d->outIccUrlEdit->lineEdit(), &QLineEdit::textChanged,
851 connect(
d->blackPointCheckBox, &QCheckBox::toggled,
854 connect(
d->whitePointCheckBox, &QCheckBox::toggled,
857 connect(
d->sixteenBitsImage, &QCheckBox::toggled,
860 connect(
d->fixColorsHighlightsBox, &QCheckBox::toggled,
863 connect(
d->autoBrightnessBox, &QCheckBox::toggled,
866 connect(
d->fourColorCheckBox, &QCheckBox::toggled,
869 connect(
d->dontStretchPixelsCheckBox, &QCheckBox::toggled,
872 connect(
d->refineInterpolationBox, &QCheckBox::toggled,