From 7dd435b4ff09f227465729325eb8798db5411969 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:34:36 +0200 Subject: [PATCH 01/17] Update TooWaBlue-Bright-GTK3-20_.css --- rtdata/themes/TooWaBlue-Bright-GTK3-20_.css | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css b/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css index 14f2e3002..888533053 100644 --- a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css @@ -31,19 +31,19 @@ @define-color bg-highlighted-text-color rgb(43,119,196); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ @define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ -@define-color bg-image rgb(90,90,90); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ +@define-color bg-image rgb(95,95,95); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ @define-color accent-color2 rgb(43,119,196); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ -@define-color accent-color4 rgb(128,128,128); /*** Slider knob * Default: rgb(115,115,115) ***/ +@define-color accent-color4 rgb(135,135,135); /*** Slider knob * Default: rgb(115,115,115) ***/ @define-color accent-color3 rgb(43,119,196); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ @define-color text-hl-color3 rgb(255,255,255); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ /*** Change me end *****************************************************************************/ -@define-color bg-light-grey rgb(110,110,110); -@define-color bg-grey rgb(90,90,90); -@define-color bg-dark-grey rgb(50,50,50); +@define-color bg-light-grey rgb(115,115,115); +@define-color bg-grey rgb(95,95,95); +@define-color bg-dark-grey rgb(55,55,55); @define-color bg-button-hover rgba(0,0,0,.25); @define-color bg-button-active rgba(0,0,0,.60); @@ -58,12 +58,15 @@ @define-color text-color rgb(210,210,210); @define-color text-tbEntry rgb(230,230,230); @define-color border-color rgba(255,255,255,.35); -@define-color bg-list-hover rgb(60,60,60); +@define-color bg-list-hover rgb(68,68,68); @define-color bg-scale-entry rgba(0,0,0,.14); -@define-color bg-button-border rgba(0,0,0,.60); +@define-color bg-button-border rgba(0,0,0,.5); @define-color bg-entry-border rgba(0,0,0,.40); @define-color view-grid-border rgba(255,255,255,0.25); @define-color headline-big rgb(210,210,210); @define-color headline-hl rgb(255,255,255); @define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(145,145,145); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.3); /***********************************************************************************************/ From f0432666336c21439b68453d74a91ed7b45252e4 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:35:44 +0200 Subject: [PATCH 02/17] Update TooWaBlue-Dark-GTK3-20_.css --- rtdata/themes/TooWaBlue-Dark-GTK3-20_.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css index f1a42bfa4..23e32e1ec 100644 --- a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css @@ -43,7 +43,7 @@ @define-color bg-light-grey rgb(75,75,75); @define-color bg-grey rgb(58,58,58); -@define-color bg-dark-grey rgb(36,36,36); +@define-color bg-dark-grey rgb(30,30,30); @define-color bg-button-hover rgba(0,0,0,.3); @define-color bg-button-active rgba(0,0,0,.7); @@ -66,4 +66,7 @@ @define-color headline-big rgb(187,187,187); @define-color headline-hl rgb(215,215,215); @define-color headline-frame rgb(210,210,210); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.35); /***********************************************************************************************/ From 6be10fb314f0ca2617e7964c1eef2357324a680a Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:37:21 +0200 Subject: [PATCH 03/17] Update TooWaBlue-GTK3-20_.css Version 2.53 --- rtdata/themes/TooWaBlue-GTK3-20_.css | 33 ++++++++++++++++------------ 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/rtdata/themes/TooWaBlue-GTK3-20_.css b/rtdata/themes/TooWaBlue-GTK3-20_.css index 28c3b971a..e009c6d9a 100644 --- a/rtdata/themes/TooWaBlue-GTK3-20_.css +++ b/rtdata/themes/TooWaBlue-GTK3-20_.css @@ -2,7 +2,7 @@ This file is part of RawTherapee. Copyright (c) 2016-2017 TooWaBoo - Version 2.51 - requires RT 5.0 (Gtk+ >= 3.20) + Version 2.53 - requires RT 5.0 (Gtk+ >= 3.20) RawTherapee is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -26,7 +26,7 @@ @define-color bg-highlighted-text-color rgb(35,99,166); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ @define-color highlighted-text-color rgb(210,210,210); /*** Highlighted text color * Default: rgb(210,210,210) ***/ -@define-color bg-image rgb(70,70,70); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ +@define-color bg-image rgb(75,75,75); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ @define-color accent-color2 rgb(35,99,166); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ @define-color accent-color4 rgb(115,115,115); /*** Slider knob * Default: rgb(115,115,115) ***/ @@ -36,9 +36,9 @@ /*** Change me end *****************************************************************************/ -@define-color bg-light-grey rgb(90,90,90); -@define-color bg-grey rgb(70,70,70); -@define-color bg-dark-grey rgb(36,36,36); +@define-color bg-light-grey rgb(95,95,95); +@define-color bg-grey rgb(75,75,75); +@define-color bg-dark-grey rgb(40,40,40); @define-color bg-button-hover rgba(0,0,0,.25); @define-color bg-button-active rgba(0,0,0,.60); @@ -47,8 +47,8 @@ @define-color winTitle rgb(190,190,190); @define-color bg-tooltip rgb(185,185,185); -@define-color border-tooltip rgb(36,36,36); -@define-color text-tooltip rgb(36,36,36); +@define-color border-tooltip rgb(40,40,40); +@define-color text-tooltip rgb(40,40,40); /***********************************************/ @define-color text-color rgb(186,186,186); @define-color text-tbEntry rgb(192,192,192); @@ -61,6 +61,9 @@ @define-color headline-big rgb(195,195,195); @define-color headline-hl rgb(230,230,230); @define-color headline-frame rgb(215,215,215); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(128,128,128); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.33); /***********************************************************************************************/ * { @@ -72,7 +75,7 @@ } *:disabled { - color: rgb(128,128,128); + color: @fg-disabled; } #ToolPanelNotebook { @@ -422,6 +425,7 @@ paned.horizontal > separator { } paned.vertical > separator { + background-image: image(@bg-dark-grey); background-color: @bg-light-grey; min-height: 0.5em; border-top: 1px solid @bg-light-grey; @@ -594,7 +598,7 @@ scale slider { margin: calc(-0.33334em - 1px); border-radius: 0.83334em; background-image: linear-gradient(to bottom, shade (@accent-color4,1.15), shade (@accent-color4,.85)); - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: none; } scale slider:hover { @@ -604,13 +608,13 @@ scale slider:hover { scale trough { margin: 0.5em; /* has to be half of "scale slider / min-width min-height*/ background-color: @bg-scale-entry; - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: inset 0 0.08334em rgba(255, 255, 255, 0.11), 0 0.08334em rgba(242, 242, 242, 0.11); border-radius: 0.5em; } scale:not(:disabled) trough highlight { background-color: @accent-color2; - border: 0.08334em solid @bg-dark-grey; + border: 0.08334em solid @bg-button-border; box-shadow: inset 0 0.08334em shade(@accent-color2, 1.3); border-radius: 0.5em; } @@ -1639,7 +1643,7 @@ radiobutton { check, radio { - border: calc(0.083334em + 0.18px) solid shade(@text-color, .9); + border: calc(0.083334em + 0.18px) solid @text-color; background-image: none; background-color: transparent; margin: 0; @@ -1649,6 +1653,7 @@ radio { box-shadow: none; background-repeat: no-repeat; -gtk-icon-shadow: none; + color: @text-color; } radiobutton label, checkbutton label { @@ -1664,7 +1669,7 @@ radio{ } check:disabled, radio:disabled { - border-color: rgb(120,120,120); + border-color: @fg-disabled; } frame > checkbutton check{ @@ -1717,7 +1722,7 @@ spinbutton { min-width: 0; border-top-left-radius: 1.83334em; border-bottom-left-radius: 1.83334em; - background-color: shade(@bg-grey, 1.33); + background-color: @bg-tb-spinbutton; border: 0.08334em solid @bg-button-border; color: @text-tbEntry; box-shadow: inset 0.08334em 0.08334em rgba(0, 0, 0, .12), 0 0.08334em rgba(255, 255, 255, 0.12); From 9eb19bcc3c54bd0f32cb8749b1483da97446c2d3 Mon Sep 17 00:00:00 2001 From: TooWaBoo Date: Mon, 7 Aug 2017 22:39:33 +0200 Subject: [PATCH 04/17] Create TooWaGrey-ExtraBright-GTK3-20_.css --- .../themes/TooWaGrey-ExtraBright-GTK3-20_.css | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css diff --git a/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css b/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css new file mode 100644 index 000000000..98ec912b1 --- /dev/null +++ b/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css @@ -0,0 +1,72 @@ +/* + This file is part of RawTherapee. + + Copyright (c) 2016-2017 TooWaBoo + Requires RT 5.0 (Gtk+ >= 3.20) + + RawTherapee is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + RawTherapee is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with RawTherapee. If not, see . +*/ + + +/*****************************************/ +/**/ @import "TooWaBlue-GTK3-20_.css"; /**/ +/*****************************************/ + +/*** Change me *** rgb(red,green,blue) *** allowed values from 0 to 255 for each color ***/ + +@define-color accent-color rgb(110,110,110); /*** Active color for Lists, Menu, Borders ... * Default: rgb(35,99,166) ***/ +@define-color text-hl-color rgb(255,255,255); /*** Active text color * Default: rgb(210,210,210) ***/ + +@define-color bg-highlighted-text-color rgb(49,132,220); /*** Highlighted text color background* Default: rgb(35,99,166) ***/ +@define-color highlighted-text-color rgb(255,255,255); /*** Highlighted text color * Default: rgb(210,210,210) ***/ + +@define-color bg-image rgb(120,120,120); /*** Image area & File Browser background * Default: rgb(70,70,70) ***/ + +@define-color accent-color2 rgb(49,132,220); /*** Scale, Progressbar, Scrollbar, Tabs * Default: rgb(35,99,166) ***/ +@define-color accent-color4 rgb(155,155,155); /*** Slider knob * Default: rgb(115,115,115) ***/ + +@define-color accent-color3 rgb(85,85,85); /*** Selected thumbnail background color * Default: rgb(35,99,166) ***/ +@define-color text-hl-color3 rgb(230,230,230); /*** Selected thumbnail text color * Default: rgb(210,210,210) ***/ + +/*** Change me end *****************************************************************************/ + +@define-color bg-light-grey rgb(135,135,135); +@define-color bg-grey rgb(120,120,120); +@define-color bg-dark-grey rgb(85,85,85); + +@define-color bg-button-hover rgba(0,0,0,.15); +@define-color bg-button-active rgba(0,0,0,.5); + +@define-color winHeaderbar rgb(75,75,75); +@define-color winTitle rgb(210,210,210); + +@define-color bg-tooltip rgb(210,210,210); +@define-color border-tooltip rgb(50,50,50); +@define-color text-tooltip rgb(50,50,50); +/***********************************************/ +@define-color text-color rgb(230,230,230); +@define-color text-tbEntry rgb(245,245,245); +@define-color border-color rgba(255,255,255,.35); +@define-color bg-list-hover rgb(95,95,95); +@define-color bg-scale-entry rgba(0,0,0,.14); +@define-color bg-button-border rgba(0,0,0,.45); +@define-color bg-entry-border rgba(0,0,0,.40); +@define-color view-grid-border rgba(255,255,255,0.25); +@define-color headline-big rgb(210,210,210); +@define-color headline-hl rgb(255,255,255); +@define-color headline-frame rgb(245,245,245); +/*** New Color Variable v2.53 ************************************************************************/ +@define-color fg-disabled rgb(180,180,180); +@define-color bg-tb-spinbutton shade(@bg-grey, 1.20); +/***********************************************************************************************/ From 0ffbc5251eed3ac5371b75fcea57b7d327a52a0e Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 10 Aug 2017 14:20:00 +0200 Subject: [PATCH 05/17] Add CAT02 viewing conditions --- rtengine/ciecam02.cc | 13 +- rtengine/ciecam02.h | 2 +- rtengine/dcrop.cc | 396 +++++++++++++++++----------------- rtengine/improccoordinator.cc | 6 +- rtengine/improcfun.cc | 9 +- rtengine/improcfun.h | 2 +- rtengine/procevents.h | 2 + rtengine/procparams.cc | 28 +++ rtengine/procparams.h | 2 + rtengine/refreshmap.cc | 4 +- rtengine/rtengine.h | 2 +- rtengine/rtthumbnail.cc | 4 +- rtengine/simpleprocess.cc | 8 +- rtgui/colorappearance.cc | 52 ++++- rtgui/colorappearance.h | 6 +- rtgui/paramsedited.cc | 12 ++ rtgui/paramsedited.h | 2 + 17 files changed, 336 insertions(+), 214 deletions(-) diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index 08a9b3145..c9053f8bd 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -728,6 +728,8 @@ void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, double &cz, double &aw, double &fl) { n = yb / yw; + + d = d_factor( f, la ); fl = calculate_fl_from_la_ciecam02( la ); nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); @@ -742,11 +744,18 @@ void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, #endif } -void Ciecam02::initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, +void Ciecam02::initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &fl) { n = yb / yw; - d = d_factorfloat( f, la ); + + if (pilotd == 2.0) { + d = d_factorfloat( f, la ); + } else { + d = pilotd; + } + + // d = d_factorfloat( f, la ); fl = calculate_fl_from_la_ciecam02float( la ); nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); cz = 1.48f + sqrt( n ); diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index a551b2504..2e6e18295 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -108,7 +108,7 @@ public: static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); - static void initcam2float(float gamu, float yb, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + static void initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, float &cz, float &aw, float &fl); static void xyz2jchqms_ciecam02( double &J, double &C, double &h, diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 53813f6e4..f4fc7f734 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -26,12 +26,12 @@ namespace { - // "ceil" rounding - template - constexpr T skips(T a, T b) - { - return a / b + static_cast(a % b); - } +// "ceil" rounding +template +constexpr T skips (T a, T b) +{ + return a / b + static_cast (a % b); +} } @@ -41,15 +41,15 @@ namespace rtengine extern const Settings* settings; Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool isDetailWindow) - : PipetteBuffer(editDataProvider), origCrop(nullptr), laboCrop(nullptr), labnCrop(nullptr), - cropImg(nullptr), cbuf_real(nullptr), cshmap(nullptr), transCrop(nullptr), cieCrop(nullptr), cbuffer(nullptr), - updating(false), newUpdatePending(false), skip(10), - cropx(0), cropy(0), cropw(-1), croph(-1), - trafx(0), trafy(0), trafw(-1), trafh(-1), - rqcropx(0), rqcropy(0), rqcropw(-1), rqcroph(-1), - borderRequested(32), upperBorder(0), leftBorder(0), - cropAllocated(false), - cropImageListener(nullptr), parent(parent), isDetailWindow(isDetailWindow) + : PipetteBuffer (editDataProvider), origCrop (nullptr), laboCrop (nullptr), labnCrop (nullptr), + cropImg (nullptr), cbuf_real (nullptr), cshmap (nullptr), transCrop (nullptr), cieCrop (nullptr), cbuffer (nullptr), + updating (false), newUpdatePending (false), skip (10), + cropx (0), cropy (0), cropw (-1), croph (-1), + trafx (0), trafy (0), trafw (-1), trafh (-1), + rqcropx (0), rqcropy (0), rqcropw (-1), rqcroph (-1), + borderRequested (32), upperBorder (0), leftBorder (0), + cropAllocated (false), + cropImageListener (nullptr), parent (parent), isDetailWindow (isDetailWindow) { parent->crops.push_back (this); } @@ -57,7 +57,7 @@ Crop::Crop (ImProcCoordinator* parent, EditDataProvider *editDataProvider, bool Crop::~Crop () { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); std::vector::iterator i = std::find (parent->crops.begin(), parent->crops.end(), this); @@ -65,14 +65,14 @@ Crop::~Crop () parent->crops.erase (i); } - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll (); } void Crop::destroy () { - MyMutex::MyLock lock(cropMutex); - MyMutex::MyLock processingLock(parent->mProcessing); + MyMutex::MyLock lock (cropMutex); + MyMutex::MyLock processingLock (parent->mProcessing); freeAll(); } @@ -80,7 +80,7 @@ void Crop::setListener (DetailedCropListener* il) { // We can make reads in the IF, because the mProcessing lock is only needed for change if (cropImageListener != il) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); cropImageListener = il; } } @@ -95,9 +95,9 @@ EditUniqueID Crop::getCurrEditID() * Delete the edit image buffer if there's no subscriber anymore. * If allocation has to be done, it is deferred to Crop::update */ -void Crop::setEditSubscriber(EditSubscriber* newSubscriber) +void Crop::setEditSubscriber (EditSubscriber* newSubscriber) { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); // At this point, editCrop.dataProvider->currSubscriber is the old subscriber EditSubscriber *oldSubscriber = PipetteBuffer::dataProvider ? PipetteBuffer::dataProvider->getCurrSubscriber() : nullptr; @@ -123,13 +123,13 @@ void Crop::setEditSubscriber(EditSubscriber* newSubscriber) bool Crop::hasListener() { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); return cropImageListener; } void Crop::update (int todo) { - MyMutex::MyLock cropLock(cropMutex); + MyMutex::MyLock cropLock (cropMutex); ProcParams& params = parent->params; // CropGUIListener* cropgl; @@ -169,9 +169,9 @@ void Crop::update (int todo) bool needstransform = parent->ipf.needsTransform(); if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock lock(parent->minit); // Also used in improccoord + MyMutex::MyLock lock (parent->minit); // Also used in improccoord - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); if (!needsinitupdate) { setCropSizes (rqcropx, rqcropy, rqcropw, rqcroph, skip, true); @@ -186,17 +186,17 @@ void Crop::update (int todo) float autoNR = (float) settings->nrauto;// float autoNRmax = (float) settings->nrautomax;// - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); int tilesize; int overlap; - if(settings->leveldnti == 0) { + if (settings->leveldnti == 0) { tilesize = 1024; overlap = 128; } - if(settings->leveldnti == 1) { + if (settings->leveldnti == 1) { tilesize = 768; overlap = 96; } @@ -217,35 +217,35 @@ void Crop::update (int todo) int *centerTile_X = new int [numtiles_W]; int *centerTile_Y = new int [numtiles_H]; - for(int cX = 0; cX < numtiles_W; cX++) { + for (int cX = 0; cX < numtiles_W; cX++) { centerTile_X[cX] = tileWskip / 2 + tileWskip * cX; } - for(int cY = 0; cY < numtiles_H; cY++) { + for (int cY = 0; cY < numtiles_H; cY++) { centerTile_Y[cY] = tileHskip / 2 + tileHskip * cY; } - if(settings->leveldnautsimpl == 1) { - if(params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { + if (settings->leveldnautsimpl == 1) { + if (params.dirpyrDenoise.Cmethod == "MAN" || params.dirpyrDenoise.Cmethod == "PON" ) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } } else { - if(params.dirpyrDenoise.C2method == "MANU") { + if (params.dirpyrDenoise.C2method == "MANU") { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } } - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PRE") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "PREV")) { PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); - if((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { + if ((!isDetailWindow) && parent->adnListener && skip == 1 && params.dirpyrDenoise.enabled) { float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } @@ -256,16 +256,16 @@ void Crop::update (int todo) int poscenterX = 0; int poscenterY = 0; - for(int cc = 0; cc < numtiles_W; cc++) { - if(abs(centerTile_X[cc] - CenterPreview_X) < minimuX) { - minimuX = abs(centerTile_X[cc] - CenterPreview_X); + for (int cc = 0; cc < numtiles_W; cc++) { + if (abs (centerTile_X[cc] - CenterPreview_X) < minimuX) { + minimuX = abs (centerTile_X[cc] - CenterPreview_X); poscenterX = cc; } } - for(int cc = 0; cc < numtiles_H; cc++) { - if(abs(centerTile_Y[cc] - CenterPreview_Y) < minimuY) { - minimuY = abs(centerTile_Y[cc] - CenterPreview_Y); + for (int cc = 0; cc < numtiles_H; cc++) { + if (abs (centerTile_Y[cc] - CenterPreview_Y) < minimuY) { + minimuY = abs (centerTile_Y[cc] - CenterPreview_Y); poscenterY = cc; } } @@ -273,20 +273,20 @@ void Crop::update (int todo) // printf("TileCX=%d TileCY=%d prevX=%d prevY=%d \n",centerTile_X[poscenterX],centerTile_Y[poscenterY],CenterPreview_X,CenterPreview_Y); int crW; - if(settings->leveldnv == 0) { + if (settings->leveldnv == 0) { crW = 100; } - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; } @@ -308,7 +308,7 @@ void Crop::update (int todo) adjustr = 1.f / 1.2f; } - if(parent->adnListener) { + if (parent->adnListener) { parent->adnListener->noiseTilePrev (centerTile_X[poscenterX], centerTile_Y[poscenterY], CenterPreview_X, CenterPreview_Y, crW, trafw * skip); } @@ -325,15 +325,15 @@ void Crop::update (int todo) int H = origCrop->getHeight(); Imagefloat *provicalc = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCrop->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCrop->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCrop->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCrop->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float maxr = 0.f; float maxb = 0.f; @@ -347,19 +347,19 @@ void Crop::update (int todo) maxblueaut = 0.f; minredaut = 0.f; minblueaut = 0.f; - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); - parent->ipf.RGB_denoise_info(origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_info (origCrop, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc, true); // printf("redy=%f skin=%f pcskin=%f\n",redyel, skinc,nsknc); // printf("DCROP skip=%d cha=%4.0f Nb=%d red=%4.0f bl=%4.0f redM=%4.0f bluM=%4.0f L=%4.0f sigL=%4.0f Ch=%4.0f Si=%4.0f\n",skip, chaut,Nb, redaut,blueaut, maxredaut, maxblueaut, lumema, sigma_L, chromina, sigma); float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good for gamma=1 } - float maxmax = max(maxredaut, maxblueaut); + float maxmax = max (maxredaut, maxblueaut); float delta; int mode = 0; // float redyel, skinc, nsknc; @@ -367,18 +367,18 @@ void Crop::update (int todo) parent->ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); - if(maxredaut > maxblueaut) { + if (maxredaut > maxblueaut) { // maxr=(maxredaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minblueaut <= minredaut && minblueaut < chaut) { + if (minblueaut <= minredaut && minblueaut < chaut) { maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); } } else { // maxb=(maxblueaut-chaut)/((autoNRmax*multip*adjustr)/2.f); maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minredaut <= minblueaut && minredaut < chaut) { + if (minredaut <= minblueaut && minredaut < chaut) { maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); } }//maxb mxr - empirical evaluation red / blue @@ -387,31 +387,31 @@ void Crop::update (int todo) params.dirpyrDenoise.chroma = chaut / (autoNR * multip * adjustr * lowdenoise); params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); delete provicalc; } } - if(skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { + if (skip == 1 && params.dirpyrDenoise.enabled && !parent->denoiseInfoStore.valid && ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO"))) { MyTime t1aue, t2aue; t1aue.set(); int crW = 100; // settings->leveldnv == 0 int crH = 100; // settings->leveldnv == 0 - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int((tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -419,13 +419,13 @@ void Crop::update (int todo) float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - parent->ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + parent->ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); int Nb[9]; #ifdef _OPENMP #pragma omp parallel @@ -448,26 +448,26 @@ void Crop::update (int todo) #pragma omp for schedule(dynamic) collapse(2) nowait #endif - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); parent->imgsrc->getImage (parent->currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - parent->imgsrc->convertColorSpace(provicalc, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (provicalc, params.icm, parent->currWB); //for denoise luminance curve float pondcorrec = 1.0f; float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; int nb = 0; - parent->ipf.RGB_denoise_info(origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + parent->ipf.RGB_denoise_info (origCropPart, provicalc, parent->imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, parent->imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); //printf("DCROP skip=%d cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f\n",skip, chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema); Nb[hcr * 3 + wcr] = nb; @@ -506,7 +506,7 @@ void Crop::update (int todo) float multip = 1.f; - if(!parent->imgsrc->isRAW()) { + if (!parent->imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } @@ -533,15 +533,15 @@ void Crop::update (int todo) int lissage = settings->leveldnliss; for (int k = 0; k < 9; k++) { - float maxmax = max(parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); + float maxmax = max (parent->denoiseInfoStore.max_r[k], parent->denoiseInfoStore.max_b[k]); parent->ipf.calcautodn_info (parent->denoiseInfoStore.ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k]); // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); } for (int k = 0; k < 9; k++) { - if(parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { + if (parent->denoiseInfoStore.max_r[k] > parent->denoiseInfoStore.max_b[k]) { Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = - (parent->denoiseInfoStore.ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); Max_B[k] = 0.f; Min_R[k] = 0.f; } else { @@ -560,19 +560,19 @@ void Crop::update (int todo) MinRMoy += Min_R[k]; MinBMoy += Min_B[k]; - if(Max_R[k] > MaxR) { + if (Max_R[k] > MaxR) { MaxR = Max_R[k]; } - if(Max_B[k] > MaxB) { + if (Max_B[k] > MaxB) { MaxB = Max_B[k]; } - if(Min_R[k] < MinR) { + if (Min_R[k] < MinR) { MinR = Min_R[k]; } - if(Min_B[k] < MinB) { + if (Min_B[k] < MinB) { MinB = Min_B[k]; } } @@ -583,7 +583,7 @@ void Crop::update (int todo) MinBMoy /= 9; MinRMoy /= 9; - if(MaxR > MaxB) { + if (MaxR > MaxB) { maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev //maxb=MinB; maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; @@ -597,55 +597,56 @@ void Crop::update (int todo) params.dirpyrDenoise.redchro = maxr; params.dirpyrDenoise.bluechro = maxb; parent->denoiseInfoStore.valid = true; - if(parent->adnListener) { - parent->adnListener->chromaChanged(params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); + + if (parent->adnListener) { + parent->adnListener->chromaChanged (params.dirpyrDenoise.chroma, params.dirpyrDenoise.redchro, params.dirpyrDenoise.bluechro); } if (settings->verbose) { t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); } //end evaluate noise } // if(params.dirpyrDenoise.Cmethod=="AUT" || params.dirpyrDenoise.Cmethod=="PON") {//reinit origCrop after Auto - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit origCrop after Auto + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { //reinit origCrop after Auto PreviewProps pp (trafx, trafy, trafw * skip, trafh * skip, skip); parent->imgsrc->getImage (parent->currWB, tr, origCrop, pp, params.toneCurve, params.icm, params.raw ); } DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; - if(params.dirpyrDenoise.Lmethod == "CUR") { - if(noiseLCurve) { + if (params.dirpyrDenoise.Lmethod == "CUR") { + if (noiseLCurve) { denoiseParams.luma = 0.5f; //very small value to init process - select curve or slider } else { denoiseParams.luma = 0.0f; } - } else if(denoiseParams.Lmethod == "SLI") { + } else if (denoiseParams.Lmethod == "SLI") { noiseLCurve.Reset(); } - if((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip + if ((noiseLCurve || noiseCCurve ) && skip == 1 && denoiseParams.enabled) { //only allocate memory if enabled and skip // we only need image reduced to 1/4 here int W = origCrop->getWidth(); int H = origCrop->getHeight(); calclum = new Imagefloat ((W + 1) / 2, (H + 1) / 2); //for denoise curves - for(int ii = 0; ii < H; ii += 2) { - for(int jj = 0; jj < W; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = origCrop->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = origCrop->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = origCrop->b(ii, jj); + for (int ii = 0; ii < H; ii += 2) { + for (int jj = 0; jj < W; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = origCrop->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = origCrop->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = origCrop->b (ii, jj); } } - parent->imgsrc->convertColorSpace(calclum, params.icm, parent->currWB);//for denoise luminance curve + parent->imgsrc->convertColorSpace (calclum, params.icm, parent->currWB); //for denoise luminance curve } - if(skip != 1) if(parent->adnListener) { - parent->adnListener->noiseChanged(0.f, 0.f); + if (skip != 1) if (parent->adnListener) { + parent->adnListener->noiseChanged (0.f, 0.f); } if (todo & M_LINDENOISE) { @@ -653,26 +654,26 @@ void Crop::update (int todo) int kall = 0; float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; - parent->ipf.RGB_denoise(kall, origCrop, origCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + parent->ipf.RGB_denoise (kall, origCrop, origCrop, calclum, parent->denoiseInfoStore.ch_M, parent->denoiseInfoStore.max_r, parent->denoiseInfoStore.max_b, parent->imgsrc->isRAW(), /*Roffset,*/ denoiseParams, parent->imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); if (parent->adnListener) { - parent->adnListener->noiseChanged(nresi, highresi); + parent->adnListener->noiseChanged (nresi, highresi); } if (settings->leveldnautsimpl == 1) { if ((denoiseParams.Cmethod == "AUT" || denoiseParams.Cmethod == "PRE") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } else { - if((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders - parent->adnListener->chromaChanged(denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); + if ((denoiseParams.C2method == "AUTO" || denoiseParams.C2method == "PREV") && (parent->adnListener)) { // force display value of sliders + parent->adnListener->chromaChanged (denoiseParams.chroma, denoiseParams.redchro, denoiseParams.bluechro); } } } } - parent->imgsrc->convertColorSpace(origCrop, params.icm, parent->currWB); + parent->imgsrc->convertColorSpace (origCrop, params.icm, parent->currWB); delete [] min_r; delete [] min_b; @@ -687,7 +688,7 @@ void Crop::update (int todo) } // has to be called after setCropSizes! Tools prior to this point can't handle the Edit mechanism, but that shouldn't be a problem. - createBuffer(cropw, croph); + createBuffer (cropw, croph); // transform if (needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) { @@ -696,13 +697,14 @@ void Crop::update (int todo) } if (needstransform) - parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips(parent->fw, skip), skips(parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), + parent->ipf.transform (baseCrop, transCrop, cropx / skip, cropy / skip, trafx / skip, trafy / skip, skips (parent->fw, skip), skips (parent->fh, skip), parent->getFullWidth(), parent->getFullHeight(), parent->imgsrc->getMetaData()->getFocalLen(), parent->imgsrc->getMetaData()->getFocalLen35mm(), parent->imgsrc->getMetaData()->getFocusDist(), parent->imgsrc->getMetaData()->getFNumber(), parent->imgsrc->getRotateDegree(), false); - else - baseCrop->copyData(transCrop); + else { + baseCrop->copyData (transCrop); + } if (transCrop) { baseCrop = transCrop; @@ -719,29 +721,29 @@ void Crop::update (int todo) const int W = baseCrop->getWidth(); const int H = baseCrop->getHeight(); - LabImage labcbdl(W, H); - parent->ipf.rgb2lab(*baseCrop, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + parent->ipf.rgb2lab (*baseCrop, labcbdl, params.icm.working); parent->ipf.dirpyrequalizer (&labcbdl, skip); - parent->ipf.lab2rgb(labcbdl, *baseCrop, params.icm.working); + parent->ipf.lab2rgb (labcbdl, *baseCrop, params.icm.working); } // blurmap for shadow & highlights if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(skips(parent->fw, skip) * skips(parent->fw, skip) + skips(parent->fh, skip) * skips(parent->fh, skip))) / 2.0; + double radius = sqrt (double (skips (parent->fw, skip) * skips (parent->fw, skip) + skips (parent->fh, skip) * skips (parent->fh, skip))) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!cshmap) { + if (!cshmap) { cshmap = new SHMap (cropw, croph, true); } cshmap->update (baseCrop, shradius, parent->ipf.lumimul, params.sh.hq, skip); - if(parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values + if (parent->shmap->min_f < 65535.f) { // don't call forceStat with wrong values cshmap->forceStat (parent->shmap->max_f, parent->shmap->min_f, parent->shmap->avg); } } @@ -763,11 +765,11 @@ void Crop::update (int todo) if (todo & M_RGBCURVE) { double rrm, ggm, bbm; DCPProfile::ApplyState as; - DCPProfile *dcpProf = parent->imgsrc->getDCP(params.icm, parent->currWB, as); + DCPProfile *dcpProf = parent->imgsrc->getDCP (params.icm, parent->currWB, as); LUTu histToneCurve; parent->ipf.rgbProc (baseCrop, laboCrop, this, parent->hltonecurve, parent->shtonecurve, parent->tonecurve, cshmap, - params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit , parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, + params.toneCurve.saturation, parent->rCurve, parent->gCurve, parent->bCurve, parent->colourToningSatLimit, parent->colourToningSatLimitOpacity, parent->ctColorCurve, parent->ctOpacityCurve, parent->opautili, parent->clToningcurve, parent->cl2Toningcurve, parent->customToneCurve1, parent->customToneCurve2, parent->beforeToneCurveBW, parent->afterToneCurveBW, rrm, ggm, bbm, parent->bwAutoR, parent->bwAutoG, parent->bwAutoB, dcpProf, as, histToneCurve); } @@ -791,7 +793,7 @@ void Crop::update (int todo) // apply luminance operations if (todo & (M_LUMINANCE + M_COLOR)) { //I made a little change here. Rather than have luminanceCurve (and others) use in/out lab images, we can do more if we copy right here. - labnCrop->CopyFrom(laboCrop); + labnCrop->CopyFrom (laboCrop); //parent->ipf.luminanceCurve (labnCrop, labnCrop, parent->lumacurve); @@ -808,24 +810,24 @@ void Crop::update (int todo) parent->ipf.chromiLuminanceCurve (this, 1, labnCrop, labnCrop, parent->chroma_acurve, parent->chroma_bcurve, parent->satcurve, parent->lhskcurve, parent->clcurve, parent->lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); parent->ipf.vibrance (labnCrop); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - parent->ipf.EPDToneMap(labnCrop, 5, skip); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + parent->ipf.EPDToneMap (labnCrop, 5, skip); } //parent->ipf.EPDToneMap(labnCrop, 5, 1); //Go with much fewer than normal iterates for fast redisplay. // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled if (skip == 1) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { parent->ipf.impulsedenoise (labnCrop); } - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled) ) { parent->ipf.defringe (labnCrop); } parent->ipf.MLsharpen (labnCrop); - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { parent->ipf.MLmicrocontrast (labnCrop); parent->ipf.sharpening (labnCrop, (float**)cbuffer, params.sharpening); } @@ -834,46 +836,46 @@ void Crop::update (int todo) // if (skip==1) { WaveletParams WaveParams = params.wavelet; - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled))) { parent->ipf.dirpyrequalizer (labnCrop, skip); // parent->ipf.Lanczoslab (labnCrop,labnCrop , 1.f/skip); } } int kall = 0; - int minwin = min(labnCrop->W, labnCrop->H); + int minwin = min (labnCrop->W, labnCrop->H); int maxlevelcrop = 10; // if(cp.mul[9]!=0)maxlevelcrop=10; // adap maximum level wavelet to size of crop - if(minwin * skip < 1024) { + if (minwin * skip < 1024) { maxlevelcrop = 9; //sampling wavelet 512 } - if(minwin * skip < 512) { + if (minwin * skip < 512) { maxlevelcrop = 8; //sampling wavelet 256 } - if(minwin * skip < 256) { + if (minwin * skip < 256) { maxlevelcrop = 7; //sampling 128 } - if(minwin * skip < 128) { + if (minwin * skip < 128) { maxlevelcrop = 6; } - if(minwin < 64) { + if (minwin < 64) { maxlevelcrop = 5; } int realtile; - if(params.wavelet.Tilesmethod == "big") { + if (params.wavelet.Tilesmethod == "big") { realtile = 22; } - if(params.wavelet.Tilesmethod == "lit") { + if (params.wavelet.Tilesmethod == "lit") { realtile = 12; } @@ -885,32 +887,32 @@ void Crop::update (int todo) parent->ipf.Tile_calc (tilesize, overlap, kall, labnCrop->W, labnCrop->H, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); //now we have tile dimensions, overlaps //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - int minsizetile = min(tilewidth, tileheight); + int minsizetile = min (tilewidth, tileheight); int maxlev2 = 10; - if(minsizetile < 1024 && maxlevelcrop == 10) { + if (minsizetile < 1024 && maxlevelcrop == 10) { maxlev2 = 9; } - if(minsizetile < 512) { + if (minsizetile < 512) { maxlev2 = 8; } - if(minsizetile < 256) { + if (minsizetile < 256) { maxlev2 = 7; } - if(minsizetile < 128) { + if (minsizetile < 128) { maxlev2 = 6; } - int maxL = min(maxlev2, maxlevelcrop); + int maxL = min (maxlev2, maxlevelcrop); - if(parent->awavListener) { - parent->awavListener->wavChanged(float(maxL)); + if (parent->awavListener) { + parent->awavListener->wavChanged (float (maxL)); } - if((params.wavelet.enabled)) { + if ((params.wavelet.enabled)) { WavCurve wavCLVCurve; WavOpacityCurveRG waOpacityCurveRG; WavOpacityCurveBY waOpacityCurveBY; @@ -919,35 +921,35 @@ void Crop::update (int todo) LUTf wavclCurve; LUTu dummy; - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); - parent->ipf.ip_wavelet(labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); + parent->ipf.ip_wavelet (labnCrop, labnCrop, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, parent->wavclCurve, wavcontlutili, skip); } // } // } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { float fnum = parent->imgsrc->getMetaData()->getFNumber (); // F number float fiso = parent->imgsrc->getMetaData()->getISOSpeed () ; // ISO float fspeed = parent->imgsrc->getMetaData()->getShutterSpeed () ; // Speed double fcomp = parent->imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; // Scene's luminosity adaptation factor - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = pow(2., E_V - 3.); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = pow (2., E_V - 3.); // cd / m2 // end calculation adaptation scene luminosity } int begh = 0, endh = labnCrop->H; bool execsharp = false; - if(skip == 1) { + if (skip == 1) { execsharp = true; } @@ -955,10 +957,10 @@ void Crop::update (int todo) cieCrop = new CieImage (cropw, croph); } - if(settings->ciecamfloat) { - float d; // not used after this block - parent->ipf.ciecam_02float (cieCrop, float(adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, 1); + if (settings->ciecamfloat) { + float d, dj; // not used after this block + parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); } else { double dd; // not used after this block @@ -1074,13 +1076,15 @@ void Crop::freeAll () } -namespace { +namespace +{ -bool check_need_larger_crop_for_lcp_distortion(int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms) +bool check_need_larger_crop_for_lcp_distortion (int fw, int fh, int x, int y, int w, int h, const ProcParams ¶ms) { if (x == 0 && y == 0 && w == fw && h == fh) { return false; } + return (params.lensProf.lcpFile.length() > 0 && params.lensProf.useDist); } @@ -1110,12 +1114,12 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte rqcroph = rch; // store and set requested crop size - int rqx1 = LIM(rqcropx, 0, parent->fullw - 1); - int rqy1 = LIM(rqcropy, 0, parent->fullh - 1); + int rqx1 = LIM (rqcropx, 0, parent->fullw - 1); + int rqy1 = LIM (rqcropy, 0, parent->fullh - 1); int rqx2 = rqx1 + rqcropw - 1; int rqy2 = rqy1 + rqcroph - 1; - rqx2 = LIM(rqx2, 0, parent->fullw - 1); - rqy2 = LIM(rqy2, 0, parent->fullh - 1); + rqx2 = LIM (rqx2, 0, parent->fullw - 1); + rqy2 = LIM (rqy2, 0, parent->fullh - 1); this->skip = skip; @@ -1125,10 +1129,10 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte int bx2 = rqx2 + skip * borderRequested; int by2 = rqy2 + skip * borderRequested; // clip it to fit into image area - bx1 = LIM(bx1, 0, parent->fullw - 1); - by1 = LIM(by1, 0, parent->fullh - 1); - bx2 = LIM(bx2, 0, parent->fullw - 1); - by2 = LIM(by2, 0, parent->fullh - 1); + bx1 = LIM (bx1, 0, parent->fullw - 1); + by1 = LIM (by1, 0, parent->fullh - 1); + bx2 = LIM (bx2, 0, parent->fullw - 1); + by2 = LIM (by2, 0, parent->fullh - 1); int bw = bx2 - bx1 + 1; int bh = by2 - by1 + 1; @@ -1142,34 +1146,39 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte parent->ipf.transCoord (parent->fw, parent->fh, bx1, by1, bw, bh, orx, ory, orw, orh); - if (check_need_larger_crop_for_lcp_distortion(parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) { + if (check_need_larger_crop_for_lcp_distortion (parent->fw, parent->fh, orx, ory, orw, orh, parent->params)) { // TODO - this is an estimate of the max distortion relative to the image size. ATM it is hardcoded to be 15%, which seems enough. If not, need to revise - int dW = int(double(parent->fw) * 0.15 / (2 * skip)); - int dH = int(double(parent->fh) * 0.15 / (2 * skip)); + int dW = int (double (parent->fw) * 0.15 / (2 * skip)); + int dH = int (double (parent->fh) * 0.15 / (2 * skip)); int x1 = orx - dW; int x2 = orx + orw + dW; int y1 = ory - dH; int y2 = ory + orh + dH; + if (x1 < 0) { x2 += -x1; x1 = 0; } + if (x2 > parent->fw) { x1 -= x2 - parent->fw; x2 = parent->fw; } + if (y1 < 0) { y2 += -y1; y1 = 0; } + if (y2 > parent->fh) { y1 -= y2 - parent->fh; y2 = parent->fh; } - orx = max(x1, 0); - ory = max(y1, 0); - orw = min(x2 - x1, parent->fw - orx); - orh = min(y2 - y1, parent->fh - ory); + + orx = max (x1, 0); + ory = max (y1, 0); + orw = min (x2 - x1, parent->fw - orx); + orh = min (y2 - y1, parent->fh - ory); } @@ -1180,17 +1189,18 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte trafx = orx; trafy = ory; - int cw = skips(bw, skip); - int ch = skips(bh, skip); + int cw = skips (bw, skip); + int ch = skips (bh, skip); - leftBorder = skips(rqx1 - bx1, skip); - upperBorder = skips(rqy1 - by1, skip); + leftBorder = skips (rqx1 - bx1, skip); + upperBorder = skips (rqy1 - by1, skip); if (settings->verbose) { printf ("setsizes starts (%d, %d, %d, %d, %d, %d)\n", orW, orH, trafw, trafh, cw, ch); } EditType editType = ET_PIPETTE; + if (const auto editProvider = PipetteBuffer::getDataProvider ()) { if (const auto editSubscriber = editProvider->getCurrSubscriber ()) { editType = editSubscriber->getEditingType (); @@ -1208,11 +1218,11 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte origCrop = new Imagefloat; } - origCrop->allocate(trafw, trafh); // Resizing the buffer (optimization) + origCrop->allocate (trafw, trafh); // Resizing the buffer (optimization) // if transCrop doesn't exist yet, it'll be created where necessary if (transCrop) { - transCrop->allocate(cropw, croph); + transCrop->allocate (cropw, croph); } if (laboCrop) { @@ -1231,7 +1241,7 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte cropImg = new Image8; } - cropImg->allocate(cropw, croph); // Resizing the buffer (optimization) + cropImg->allocate (cropw, croph); // Resizing the buffer (optimization) //cieCrop is only used in Crop::update, it is destroyed now but will be allocated on first use if (cieCrop) { @@ -1253,18 +1263,18 @@ bool Crop::setCropSizes (int rcx, int rcy, int rcw, int rch, int skip, bool inte } cbuffer = new float*[croph]; - cbuf_real = new float[(croph + 2)*cropw]; + cbuf_real = new float[ (croph + 2)*cropw]; for (int i = 0; i < croph; i++) { cbuffer[i] = cbuf_real + cropw * i + cropw; } - if(params.sh.enabled) { + if (params.sh.enabled) { cshmap = new SHMap (cropw, croph, true); } if (editType == ET_PIPETTE) { - PipetteBuffer::resize(cropw, croph); + PipetteBuffer::resize (cropw, croph); } else if (PipetteBuffer::bufferCreated()) { PipetteBuffer::flush(); } @@ -1352,19 +1362,19 @@ void Crop::fullUpdate () int Crop::get_skip() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return skip; } int Crop::getLeftBorder() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return leftBorder; } int Crop::getUpperBorder() { - MyMutex::MyLock lock(cropMutex); + MyMutex::MyLock lock (cropMutex); return upperBorder; } diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index e7a611f0b..e3ee91540 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -746,7 +746,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int begh = 0; int endh = pH; - float d; + float d, dj; bool execsharp = false; if(!ncie) { @@ -766,10 +766,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, 1); + ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, 1); if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) { - acListener->autoCamChanged(100.*(double)d); + acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index b5e555a1f..d03ceca2c 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1468,7 +1468,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt) { if (params->colorappearance.enabled) { @@ -1630,6 +1630,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const float deg = (params->colorappearance.degree) / 100.0f; const float pilot = params->colorappearance.autodegree ? 2.0f : deg; + const float degout = (params->colorappearance.degreeout) / 100.0f; + const float pilotout = params->colorappearance.autodegreeout ? 2.0f : degout; + //algoritm's params float chr = 0.f; @@ -1860,8 +1863,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float cz, wh, pfl; Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); const float pow1 = pow_F ( 1.64f - pow_F ( 0.29f, n ), 0.73f ); - float nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2float (gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + float nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2float (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); const float reccmcz = 1.f / (c2 * czj); const float pow1n = pow_F ( 1.64f - pow_F ( 0.29f, nj ), 0.73f ); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 9167af5be..6f8307141 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -226,7 +226,7 @@ public: void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve); void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 9e515f55c..5070a9b0d 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -505,6 +505,8 @@ enum ProcEvent { EvCATtempout = 475, EvCATgreenout = 476, EvCATybout = 477, + EvCATDegreeout = 478, + EvCATAutoDegreeout = 479, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 93571122f..a16703f5a 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1118,6 +1118,8 @@ void ProcParams::setDefaults () colorappearance.enabled = false; colorappearance.degree = 90; colorappearance.autodegree = true; + colorappearance.degreeout = 90; + colorappearance.autodegreeout = true; colorappearance.surround = "Average"; colorappearance.adaplum = 16; colorappearance.badpixsl = 0; @@ -2058,6 +2060,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Color appearance", "AutoDegree", colorappearance.autodegree); } + if (!pedited || pedited->colorappearance.degreeout) { + keyFile.set_integer ("Color appearance", "Degreeout", colorappearance.degreeout); + } + + if (!pedited || pedited->colorappearance.autodegreeout) { + keyFile.set_boolean ("Color appearance", "AutoDegreeout", colorappearance.autodegreeout); + } + if (!pedited || pedited->colorappearance.surround) { keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } @@ -4937,6 +4947,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Degreeout")) { + colorappearance.degreeout = keyFile.get_integer ("Color appearance", "Degreeout"); + + if (pedited) { + pedited->colorappearance.degreeout = true; + } + } + + if (keyFile.has_key ("Color appearance", "AutoDegreeout")) { + colorappearance.autodegreeout = keyFile.get_boolean ("Color appearance", "AutoDegreeout"); + + if (pedited) { + pedited->colorappearance.autodegreeout = true; + } + } + if (keyFile.has_key ("Color appearance", "Surround")) { colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); @@ -8211,6 +8237,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.enabled == other.colorappearance.enabled && colorappearance.degree == other.colorappearance.degree && colorappearance.autodegree == other.colorappearance.autodegree + && colorappearance.degreeout == other.colorappearance.degreeout + && colorappearance.autodegreeout == other.colorappearance.autodegreeout && colorappearance.surround == other.colorappearance.surround && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 39f6eeaee..1ee5d16df 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -585,6 +585,8 @@ public: bool enabled; int degree; bool autodegree; + int degreeout; + bool autodegreeout; std::vector curve; std::vector curve2; std::vector curve3; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index af3dfafae..0a345d8ac 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -504,7 +504,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { DEMOSAIC, // EvPixelShiftEqualBrightChannel LUMINANCECURVE, // EvCATtempout LUMINANCECURVE, // EvCATgreenout - LUMINANCECURVE // EvCATybout + LUMINANCECURVE, // EvCATybout + LUMINANCECURVE, // EvCATDegreeout + LUMINANCECURVE // EvCATAutoDegreeout }; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 6ab12c026..fb93f8715 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -273,7 +273,7 @@ class AutoCamListener { public : virtual ~AutoCamListener() {} - virtual void autoCamChanged (double ccam) {} + virtual void autoCamChanged (double ccam, double ccamout) {} virtual void adapCamChanged (double cadap) {} }; diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index fd06e940f..41e52a16e 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1260,7 +1260,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei 16); int begh = 0, endh = labView->H; bool execsharp = false; - float d; + float d, dj; float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed @@ -1296,7 +1296,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei CAMMean = NAN; CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, rtt); + ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, rtt); delete cieView; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 2c5d5a10e..cc70823ff 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1122,16 +1122,16 @@ private: if (params.sharpening.enabled) { if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1); + float d, dj; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); } } else { if(settings->ciecamfloat) { - float d; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, 1); + float d, dj; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { double dd; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index af45d50b6..c01b7458f 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -450,6 +450,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); // Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); + degreeout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_CIECAT_DEGREE"), 0., 100., 1., 100.)); + + if (degreeout->delay < options.adjusterMaxDelay) { + degreeout->delay = options.adjusterMaxDelay; + } + + degreeout->throwOnButtonRelease(); + degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); + degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); + p3VBox->pack_start (*degreeout); + tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); @@ -514,6 +525,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); degree->setAdjusterListener (this); + degreeout->setAdjusterListener (this); adapscen->setAdjusterListener (this); adaplum->setAdjusterListener (this); badpixsl->setAdjusterListener (this); @@ -572,6 +584,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) if (pedited) { degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); @@ -595,6 +608,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_inconsistent (!pedited->colorappearance.sharpcie); degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree); + degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); @@ -697,11 +711,14 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoDegree = pp->colorappearance.autodegree; lastAutoAdapscen = pp->colorappearance.autoadapscen; + lastAutoDegreeout = pp->colorappearance.autodegreeout; degree->setValue (pp->colorappearance.degree); degree->setAutoValue (pp->colorappearance.autodegree); adapscen->setValue (pp->colorappearance.adapscen); adapscen->setAutoValue (pp->colorappearance.autoadapscen); + degreeout->setValue (pp->colorappearance.degreeout); + degreeout->setAutoValue (pp->colorappearance.autodegreeout); adaplum->setValue (pp->colorappearance.adaplum); badpixsl->setValue (pp->colorappearance.badpixsl); @@ -737,6 +754,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.degree = degree->getValue (); pp->colorappearance.autodegree = degree->getAutoValue (); + pp->colorappearance.degreeout = degreeout->getValue (); + pp->colorappearance.autodegreeout = degreeout->getAutoValue (); pp->colorappearance.enabled = getEnabled(); pp->colorappearance.adapscen = adapscen->getValue (); pp->colorappearance.autoadapscen = adapscen->getAutoValue (); @@ -792,6 +811,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) if (pedited) { pedited->colorappearance.degree = degree->getEditedState (); + pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); pedited->colorappearance.adaplum = adaplum->getEditedState (); pedited->colorappearance.badpixsl = badpixsl->getEditedState (); @@ -805,6 +825,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.colorh = colorh->getEditedState (); pedited->colorappearance.rstprotection = rstprotection->getEditedState (); pedited->colorappearance.autodegree = !degree->getAutoInconsistent(); + pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent(); pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); @@ -1084,6 +1105,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit { degree->setDefault (defParams->colorappearance.degree); + degreeout->setDefault (defParams->colorappearance.degreeout); adapscen->setDefault (defParams->colorappearance.adapscen); adaplum->setDefault (defParams->colorappearance.adaplum); badpixsl->setDefault (defParams->colorappearance.badpixsl); @@ -1102,6 +1124,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit if (pedited) { degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); + degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); @@ -1120,6 +1143,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit } else { degree->setDefaultEditedState (Irrelevant); + degreeout->setDefaultEditedState (Irrelevant); adapscen->setDefaultEditedState (Irrelevant); adaplum->setDefaultEditedState (Irrelevant); badpixsl->setDefaultEditedState (Irrelevant); @@ -1139,9 +1163,10 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit } } -void ColorAppearance::autoCamChanged (double ccam) +void ColorAppearance::autoCamChanged (double ccam, double ccamout) { nextCcam = ccam; + nextCcamout = ccamout; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->autoCamComputed_(); @@ -1157,6 +1182,7 @@ bool ColorAppearance::autoCamComputed_ () disableListener (); // degree->setEnabled (true); degree->setValue (nextCcam); + degreeout->setValue (nextCcamout); enableListener (); return false; @@ -1214,6 +1240,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) if (listener && (multiImage || getEnabled()) ) { if (a == degree) { listener->panelChanged (EvCATDegree, a->getTextValue()); + } else if (a == degreeout) { + listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); } else if (a == adaplum) { @@ -1263,6 +1291,15 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) lastAutoDegree = degree->getAutoValue(); + if (degreeout->getAutoInconsistent()) { + degreeout->setAutoInconsistent (false); + degreeout->setAutoValue (false); + } else if (lastAutoDegreeout) { + degreeout->setAutoInconsistent (true); + } + + lastAutoDegreeout = degreeout->getAutoValue(); + if (adapscen->getAutoInconsistent()) { adapscen->setAutoInconsistent (false); adapscen->setAutoValue (false); @@ -1285,6 +1322,17 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegree, M ("GENERAL_DISABLED")); } } + + if (a == degreeout) { + if (degreeout->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_UNCHANGED")); + } else if (degreeout->getAutoValue()) { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_DISABLED")); + } + } + if (a == adapscen) { if (adapscen->getAutoInconsistent()) { @@ -1410,6 +1458,7 @@ void ColorAppearance::setBatchMode (bool batchMode) ToolPanel::setBatchMode (batchMode); degree->showEditedCB (); + degreeout->showEditedCB (); adapscen->showEditedCB (); adaplum->showEditedCB (); badpixsl->showEditedCB (); @@ -1469,6 +1518,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) { degree->trimValue (pp->colorappearance.degree); + degreeout->trimValue (pp->colorappearance.degreeout); adapscen->trimValue (pp->colorappearance.adapscen); adaplum->trimValue (pp->colorappearance.adaplum); badpixsl->trimValue (pp->colorappearance.badpixsl); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 5f433b556..261d8f9bd 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -57,7 +57,7 @@ public: void datacie_toggled (); void tonecie_toggled (); // void sharpcie_toggled (); - void autoCamChanged (double ccam); + void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); void adapCamChanged (double cadap); bool adapCamComputed_ (); @@ -91,6 +91,7 @@ private: Adjuster* degree; Adjuster* adapscen; Adjuster* adaplum; + Adjuster* degreeout; Adjuster* badpixsl; Adjuster* jlight; Adjuster* qbright; @@ -133,9 +134,10 @@ private: DiagonalCurveEditor* shape; DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; - double nextCcam, nextCadap; + double nextCcam, nextCcamout, nextCadap; bool lastAutoDegree; bool lastAutoAdapscen; + bool lastAutoDegreeout; bool lastsurr; bool lastgamut; bool lastdatacie; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index e09b30b24..7b7942203 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -175,6 +175,8 @@ void ParamsEdited::set (bool v) colorappearance.enabled = v; colorappearance.degree = v; colorappearance.autodegree = v; + colorappearance.degreeout = v; + colorappearance.autodegreeout = v; colorappearance.surround = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; @@ -699,6 +701,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.enabled = colorappearance.enabled && p.colorappearance.enabled == other.colorappearance.enabled; colorappearance.degree = colorappearance.degree && p.colorappearance.degree == other.colorappearance.degree; colorappearance.autodegree = colorappearance.autodegree && p.colorappearance.autodegree == other.colorappearance.autodegree; + colorappearance.degreeout = colorappearance.degreeout && p.colorappearance.degreeout == other.colorappearance.degreeout; + colorappearance.autodegreeout = colorappearance.autodegreeout && p.colorappearance.autodegreeout == other.colorappearance.autodegreeout; colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; @@ -1711,6 +1715,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.autodegree = mods.colorappearance.autodegree; } + if (colorappearance.degreeout) { + toEdit.colorappearance.degreeout = mods.colorappearance.degreeout; + } + + if (colorappearance.autodegreeout) { + toEdit.colorappearance.autodegreeout = mods.colorappearance.autodegreeout; + } + if (colorappearance.surround) { toEdit.colorappearance.surround = mods.colorappearance.surround; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 1ec6bac6c..7d0ce7fde 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -289,6 +289,8 @@ public: bool enabled; bool degree; bool autodegree; + bool degreeout; + bool autodegreeout; bool autoadapscen; bool surround; bool adapscen; From 5f8555e84c493d85620784305c1338dff5a731f9 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 10 Aug 2017 17:09:46 +0200 Subject: [PATCH 06/17] Add temp and green for scene --- rtdata/languages/default | 7 ++++- rtengine/improcfun.cc | 26 +++++++++++++---- rtengine/procevents.h | 2 ++ rtengine/procparams.cc | 28 +++++++++++++++++++ rtengine/procparams.h | 2 ++ rtengine/refreshmap.cc | 4 ++- rtgui/colorappearance.cc | 60 ++++++++++++++++++++++++++++++++++++---- rtgui/colorappearance.h | 2 ++ rtgui/paramsedited.cc | 12 ++++++++ rtgui/paramsedited.h | 2 ++ 10 files changed, 133 insertions(+), 12 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 23d12e1be..f4546245e 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -707,6 +707,10 @@ HISTORY_MSG_475;PS - Equalize channel HISTORY_MSG_476;CAM02 - Temp out HISTORY_MSG_477;CAM02 - Green out HISTORY_MSG_478;CAM02 - Yb out +HISTORY_MSG_479;CAM02 - CAT adaptation out +HISTORY_MSG_480;CAM02 - CAT auto out +HISTORY_MSG_481;CAM02 - temp scene +HISTORY_MSG_482;CAM02 - green scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot @@ -1308,6 +1312,7 @@ TP_COLORAPP_DATACIE;CIECAM02 output histograms in curves TP_COLORAPP_DATACIE_TOOLTIP;When enabled, histograms in CIECAM02 curves show approximate values/ranges for J or Q, and C, s or M after the CIECAM02 adjustments.\nThis selection does not impact the main histogram panel.\n\nWhen disabled, histograms in CIECAM02 curves show L*a*b* values before CIECAM02 adjustments. TP_COLORAPP_DEGREE_AUTO_TOOLTIP;If the check-box is checked (recommended), RawTherapee calculates an optimum value, which is then used by CAT02, and also for the entire CIECAM02.\nTo set the value manually, uncheck the check-box first (values above 65 are recommended). TP_COLORAPP_DEGREE_TOOLTIP;Amount of CIE Chromatic Adaptation Transform 2002. +TP_COLORAPP_FREE;Free temp+green + CAT02 + [output] TP_COLORAPP_GAMUT;Gamut control (L*a*b*) TP_COLORAPP_GAMUT_TOOLTIP;Allow gamut control in L*a*b* mode. TP_COLORAPP_HUE;Hue (h) @@ -1319,7 +1324,7 @@ TP_COLORAPP_LABEL_VIEWING;Viewing Conditions TP_COLORAPP_LIGHT;Lightness (J) TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. TP_COLORAPP_MODEL;WP Model -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. +TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index d03ceca2c..1429b3b68 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -541,7 +541,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw = 100.0 * Xw; yw = 100.0 * Yw; zw = 100.0 * Zw; - double xw1, yw1, zw1, xw2, yw2, zw2; + double xw1 =0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -1497,10 +1497,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int double Xw, Zw; float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d - float xwd, ywd, zwd; + float xwd, ywd, zwd, xws, yws, zws; int alg = 0; bool algepd = false; double Xwout, Zwout; + double Xwsc, Zwsc; const bool epdEnabled = params->epd.enabled; bool ciedata = (params->colorappearance.datacie && pW != 1) && ! ((params->colorappearance.tonecie && (epdEnabled)) || (params->sharpening.enabled && settings->autocielab && execsharp) @@ -1509,6 +1510,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); //viewing condition for surround if (params->colorappearance.surround == "Average") { @@ -1556,6 +1558,12 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xwd = 100.f * Xwout; zwd = 100.f * Zwout; ywd = 100.f / params->colorappearance.greenout;//approximation to simplify + + xws = 100.f * Xwsc; + zws = 100.f * Zwsc; + yws = 100.f / params->colorappearance.greensc;//approximation to simplify + + /* //settings white point of output device - or illuminant viewing if (settings->viewingdevice == 0) { @@ -1841,7 +1849,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw = 100.0f * Xw; yw = 100.0f * Yw; zw = 100.0f * Zw; - float xw1, yw1, zw1, xw2, yw2, zw2; + float xw1 = 0.f, yw1 = 0.f, zw1 = 0.f, xw2 = 0.f, yw2 = 0.f, zw2 = 0.f; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -1851,14 +1859,22 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else { /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ + } else if(params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } + } else if(params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; + } + float cz, wh, pfl; Ciecam02::initcam1float (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 5070a9b0d..88aaf0e3f 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -507,6 +507,8 @@ enum ProcEvent { EvCATybout = 477, EvCATDegreeout = 478, EvCATAutoDegreeout = 479, + EvCATtempsc = 480, + EvCATgreensc = 481, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a16703f5a..8ed7236cb 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1154,6 +1154,8 @@ void ProcParams::setDefaults () colorappearance.tempout = 5000; colorappearance.greenout = 1.0; colorappearance.ybout = 18; + colorappearance.tempsc = 5000; + colorappearance.greensc = 1.0; impulseDenoise.enabled = false; impulseDenoise.thresh = 50; @@ -2149,6 +2151,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_double ("Color appearance", "Greenout", colorappearance.greenout); } + if (!pedited || pedited->colorappearance.tempsc) { + keyFile.set_integer ("Color appearance", "Tempsc", colorappearance.tempsc); + } + + if (!pedited || pedited->colorappearance.greensc) { + keyFile.set_double ("Color appearance", "Greensc", colorappearance.greensc); + } + if (!pedited || pedited->colorappearance.ybout) { keyFile.set_integer ("Color appearance", "Ybout", colorappearance.ybout); } @@ -5124,6 +5134,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Tempsc")) { + colorappearance.tempsc = keyFile.get_integer ("Color appearance", "Tempsc"); + + if (pedited) { + pedited->colorappearance.tempsc = true; + } + } + + if (keyFile.has_key ("Color appearance", "Greensc")) { + colorappearance.greensc = keyFile.get_double ("Color appearance", "Greensc"); + + if (pedited) { + pedited->colorappearance.greensc = true; + } + } + if (keyFile.has_key ("Color appearance", "Ybout")) { colorappearance.ybout = keyFile.get_integer ("Color appearance", "Ybout"); @@ -8260,6 +8286,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.colorh == other.colorappearance.colorh && colorappearance.tempout == other.colorappearance.tempout && colorappearance.greenout == other.colorappearance.greenout + && colorappearance.tempsc == other.colorappearance.tempsc + && colorappearance.greensc == other.colorappearance.greensc && colorappearance.ybout == other.colorappearance.ybout && impulseDenoise.enabled == other.impulseDenoise.enabled && impulseDenoise.thresh == other.impulseDenoise.thresh diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 1ee5d16df..636308800 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -619,6 +619,8 @@ public: int tempout; int ybout; double greenout; + int tempsc; + double greensc; // bool sharpcie; }; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 0a345d8ac..732e2e05d 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -506,7 +506,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvCATgreenout LUMINANCECURVE, // EvCATybout LUMINANCECURVE, // EvCATDegreeout - LUMINANCECURVE // EvCATAutoDegreeout + LUMINANCECURVE, // EvCATAutoDegreeout + LUMINANCECURVE, // EvCATtempsc + LUMINANCECURVE // EvCATgreensc }; diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index c01b7458f..983ea7552 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -159,10 +159,27 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" wbmodel = Gtk::manage (new MyComboBoxText ()); wbmodel->append (M ("TP_COLORAPP_WBRT")); wbmodel->append (M ("TP_COLORAPP_WBCAM")); + wbmodel->append (M ("TP_COLORAPP_FREE")); + wbmodel->set_active (0); wbmHBox->pack_start (*wbmodel); p1VBox->pack_start (*wbmHBox); + Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + + + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); + greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + + tempsc->show(); + greensc->show(); + p1VBox->pack_start (*tempsc); + p1VBox->pack_start (*greensc); + + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.001, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 if (adapscen->delay < options.adjusterMaxDelay) { @@ -443,10 +460,6 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adaplum->set_tooltip_markup (M ("TP_COLORAPP_ADAPTVIEWING_TOOLTIP")); p3VBox->pack_start (*adaplum); - Gtk::Image* itempL = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); // Gtk::Image* iblueredL = Gtk::manage (new RTImage ("ajd-wb-bluered1.png")); // Gtk::Image* iblueredR = Gtk::manage (new RTImage ("ajd-wb-bluered2.png")); @@ -541,6 +554,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout->setAdjusterListener (this); greenout->setAdjusterListener (this); ybout->setAdjusterListener (this); + tempsc->setAdjusterListener (this); + greensc->setAdjusterListener (this); show_all(); @@ -597,6 +612,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) tempout->setEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); greenout->setEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); ybout->setEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); contrast->setEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); @@ -654,11 +671,13 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { - wbmodel->set_active (2); + wbmodel->set_active (3); } else if (pp->colorappearance.wbmodel == "RawT") { wbmodel->set_active (0); } else if (pp->colorappearance.wbmodel == "RawTCAT02") { wbmodel->set_active (1); + } else if (pp->colorappearance.wbmodel == "free") { + wbmodel->set_active (2); } wbmodelconn.block (false); @@ -734,6 +753,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) tempout->setValue (pp->colorappearance.tempout); greenout->setValue (pp->colorappearance.greenout); ybout->setValue (pp->colorappearance.ybout); + tempsc->setValue (pp->colorappearance.tempsc); + greensc->setValue (pp->colorappearance.greensc); tcmode3conn.block (false); tcmode2conn.block (false); @@ -782,6 +803,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.tempout = tempout->getValue (); pp->colorappearance.greenout = greenout->getValue (); pp->colorappearance.ybout = ybout->getValue (); + pp->colorappearance.tempsc = tempsc->getValue (); + pp->colorappearance.greensc = greensc->getValue (); int tcMode = toneCurveMode->get_active_row_number(); @@ -846,6 +869,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.tempout = tempout->getEditedState (); pedited->colorappearance.greenout = greenout->getEditedState (); pedited->colorappearance.ybout = ybout->getEditedState (); + pedited->colorappearance.tempsc = tempsc->getEditedState (); + pedited->colorappearance.greensc = greensc->getEditedState (); } @@ -863,6 +888,9 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.wbmodel = "RawT"; } else if (wbmodel->get_active_row_number() == 1) { pp->colorappearance.wbmodel = "RawTCAT02"; + } else if (wbmodel->get_active_row_number() == 2) { + pp->colorappearance.wbmodel = "free"; + } if (algo->get_active_row_number() == 0) { @@ -1121,6 +1149,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefault (defParams->colorappearance.tempout); greenout->setDefault (defParams->colorappearance.greenout); ybout->setDefault (defParams->colorappearance.ybout); + tempsc->setDefault (defParams->colorappearance.tempsc); + greensc->setDefault (defParams->colorappearance.greensc); if (pedited) { degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); @@ -1140,6 +1170,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefaultEditedState (pedited->colorappearance.tempout ? Edited : UnEdited); greenout->setDefaultEditedState (pedited->colorappearance.greenout ? Edited : UnEdited); ybout->setDefaultEditedState (pedited->colorappearance.ybout ? Edited : UnEdited); + tempsc->setDefaultEditedState (pedited->colorappearance.tempsc ? Edited : UnEdited); + greensc->setDefaultEditedState (pedited->colorappearance.greensc ? Edited : UnEdited); } else { degree->setDefaultEditedState (Irrelevant); @@ -1159,6 +1191,8 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit tempout->setDefaultEditedState (Irrelevant); greenout->setDefaultEditedState (Irrelevant); ybout->setDefaultEditedState (Irrelevant); + tempsc->setDefaultEditedState (Irrelevant); + greensc->setDefaultEditedState (Irrelevant); } } @@ -1272,6 +1306,10 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvCATgreenout, a->getTextValue()); } else if (a == ybout) { listener->panelChanged (EvCATybout, a->getTextValue()); + } else if (a == tempsc) { + listener->panelChanged (EvCATtempsc, a->getTextValue()); + } else if (a == greensc) { + listener->panelChanged (EvCATgreensc, a->getTextValue()); } @@ -1373,6 +1411,14 @@ void ColorAppearance::surroundChanged () void ColorAppearance::wbmodelChanged () { + if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { + tempsc->hide(); + greensc->hide(); + } + if (wbmodel->get_active_row_number() == 2){ + tempsc->show(); + greensc->show(); + } if (listener && (multiImage || getEnabled()) ) { listener->panelChanged (EvCATMethodWB, wbmodel->get_active_text ()); @@ -1474,6 +1520,8 @@ void ColorAppearance::setBatchMode (bool batchMode) tempout->showEditedCB (); greenout->showEditedCB (); ybout->showEditedCB (); + tempsc->showEditedCB (); + greensc->showEditedCB (); surround->append (M ("GENERAL_UNCHANGED")); wbmodel->append (M ("GENERAL_UNCHANGED")); @@ -1534,5 +1582,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) tempout->trimValue (pp->colorappearance.tempout); greenout->trimValue (pp->colorappearance.greenout); ybout->trimValue (pp->colorappearance.ybout); + tempsc->trimValue (pp->colorappearance.tempsc); + greensc->trimValue (pp->colorappearance.greensc); } diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 261d8f9bd..f5102be95 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -105,6 +105,8 @@ private: Adjuster* tempout; Adjuster* greenout; Adjuster* ybout; + Adjuster* tempsc; + Adjuster* greensc; MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 7b7942203..d3e17b810 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -209,6 +209,8 @@ void ParamsEdited::set (bool v) colorappearance.tempout = v; colorappearance.greenout = v; colorappearance.ybout = v; + colorappearance.tempsc = v; + colorappearance.greensc = v; //colorBoost.amount = v; //colorBoost.avoidclip = v; @@ -734,6 +736,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.tempout = colorappearance.tempout && p.colorappearance.tempout == other.colorappearance.tempout; colorappearance.greenout = colorappearance.greenout && p.colorappearance.greenout == other.colorappearance.greenout; colorappearance.ybout = colorappearance.ybout && p.colorappearance.ybout == other.colorappearance.ybout; + colorappearance.tempsc = colorappearance.tempsc && p.colorappearance.tempsc == other.colorappearance.tempsc; + colorappearance.greensc = colorappearance.greensc && p.colorappearance.greensc == other.colorappearance.greensc; //colorBoost.amount = colorBoost.amount && p.colorBoost.amount == other.colorBoost.amount; //colorBoost.avoidclip = colorBoost.avoidclip && p.colorBoost.avoidclip == other.colorBoost.avoidclip; @@ -1759,6 +1763,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.greenout = mods.colorappearance.greenout; } + if (colorappearance.tempsc) { + toEdit.colorappearance.tempsc = mods.colorappearance.tempsc; + } + + if (colorappearance.greensc) { + toEdit.colorappearance.greensc = mods.colorappearance.greensc; + } + if (colorappearance.ybout) { toEdit.colorappearance.ybout = mods.colorappearance.ybout; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 7d0ce7fde..4c0bcd38e 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -316,6 +316,8 @@ public: bool tempout; bool greenout; bool ybout; + bool tempsc; + bool greensc; }; From 49d61d520954077460b15a795cc269b345897713 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 11 Aug 2017 08:21:38 +0200 Subject: [PATCH 07/17] Small changes + mode double --- rtdata/languages/default | 8 ++++---- rtengine/ciecam02.cc | 9 +++++++-- rtengine/ciecam02.h | 2 +- rtengine/dcrop.cc | 4 ++-- rtengine/improcfun.cc | 29 ++++++++++++++++++++++++----- rtengine/improcfun.h | 2 +- rtengine/simpleprocess.cc | 8 ++++---- rtgui/colorappearance.cc | 13 +++++++++---- 8 files changed, 52 insertions(+), 23 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index f4546245e..346c96a2d 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -707,10 +707,10 @@ HISTORY_MSG_475;PS - Equalize channel HISTORY_MSG_476;CAM02 - Temp out HISTORY_MSG_477;CAM02 - Green out HISTORY_MSG_478;CAM02 - Yb out -HISTORY_MSG_479;CAM02 - CAT adaptation out -HISTORY_MSG_480;CAM02 - CAT auto out -HISTORY_MSG_481;CAM02 - temp scene -HISTORY_MSG_482;CAM02 - green scene +HISTORY_MSG_479;CAM02 - CAT02 adaptation out +HISTORY_MSG_480;CAM02 - Automatic CAT02 out +HISTORY_MSG_481;CAM02 - Temp scene +HISTORY_MSG_482;CAM02 - Green scene HISTORY_NEWSNAPSHOT;Add HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s HISTORY_SNAPSHOT;Snapshot diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index c9053f8bd..5a2c96395 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -724,13 +724,18 @@ void Ciecam02::initcam1float(float gamu, float yb, float pilotd, float f, float #endif } -void Ciecam02::initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, +void Ciecam02::initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &fl) { n = yb / yw; + if (pilotd == 2.0) { + d = d_factorfloat( f, la ); + } else { + d = pilotd; + } - d = d_factor( f, la ); +// d = d_factor( f, la ); fl = calculate_fl_from_la_ciecam02( la ); nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); cz = 1.48 + sqrt( n ); diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index 2e6e18295..76a7cf5bb 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -102,7 +102,7 @@ public: static void initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); - static void initcam2(double gamu, double yb, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + static void initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, double &cz, double &aw, double &fl); static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index f4fc7f734..a93238664 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -962,10 +962,10 @@ void Crop::update (int todo) parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); } else { - double dd; // not used after this block + double dd, dj; // not used after this block parent->ipf.ciecam_02 (cieCrop, adap, begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, 1); } } else { // CIECAM is disbaled, we free up its image buffer to save some space diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 1429b3b68..5d56f01fd 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -210,7 +210,7 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt) { if (params->colorappearance.enabled) { //int lastskip; @@ -264,9 +264,12 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh Yw = 1.0; double Xw, Zw; double Xwout, Zwout; + double Xwsc, Zwsc; + double f, c, nc, yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; + double xws, yws, zws; int alg = 0; bool algepd = false; float sum = 0.f; @@ -275,6 +278,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ColorTemp::temp2mulxyz (params->wb.temperature, params->wb.green, params->wb.method, Xw, Zw); //compute white Xw Yw Zw : white current WB ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); + ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); //viewing condition for surround if (params->colorappearance.surround == "Average") { @@ -362,6 +366,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh zwd = 100. * Zwout; ywd = 100. / params->colorappearance.greenout;//approximation to simplify + xws = 100. * Xwsc; + zws = 100. * Zwsc; + yws = 100. / params->colorappearance.greensc;//approximation to simplify + /* //settings mean Luminance Y of output device or viewing if (settings->viewingdevicegrey == 0) { @@ -397,6 +405,10 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double deg = (params->colorappearance.degree) / 100.0; double pilot = params->colorappearance.autodegree ? 2.0 : deg; + + const float degout = (params->colorappearance.degreeout) / 100.0; + const float pilotout = params->colorappearance.autodegreeout ? 2.0 : degout; + //algoritm's params float jli = params->colorappearance.jlight; float chr = params->colorappearance.chroma; @@ -551,19 +563,26 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else { /*if(params->colorappearance.wbmodel == "RawTCAT02")*/ + } else if(params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } + }else if(params->colorappearance.wbmodel == "free") { + xw1 = xws; // free temp and green + yw1 = yws; + zw1 = zws; + xw2 = xwd; + yw2 = ywd; + zw2 = zwd; + } double cz, wh, pfl; Ciecam02::initcam1 (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); - double nj, dj, nbbj, ncbj, czj, awj, flj; - Ciecam02::initcam2 (gamu, yb2, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); + double nj, nbbj, ncbj, czj, awj, flj; + Ciecam02::initcam2 (gamu, yb2, pilotout, f2, la2, xw2, yw2, zw2, nj, dj, nbbj, ncbj, czj, awj, flj); diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 6f8307141..5ef287139 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -229,7 +229,7 @@ public: LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); void chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve); void vibrance (LabImage* lab);//Jacques' vibrance void colorCurve (LabImage* lold, LabImage* lnew); diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index cc70823ff..d72a69bab 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1125,16 +1125,16 @@ private: float d, dj; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); + double dd, dj; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } else { if(settings->ciecamfloat) { float d, dj; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); } else { - double dd; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, 1); + double dd, dj; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 983ea7552..ddf120c1a 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -171,8 +171,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); - greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); + greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); tempsc->show(); greensc->show(); @@ -474,8 +474,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); - tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR, itempL, &wbSlider2Temp, &wbTemp2Slider)); - greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR, igreenL)); + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + + tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); + greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); tempout->show(); From be82e1bde28fa0253b283da542a2cf50218acd2a Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 13 Aug 2017 13:07:39 +0200 Subject: [PATCH 08/17] Some changes requested by Elle --- rtdata/languages/default | 10 ++- rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 10 +-- rtengine/improcfun.cc | 15 ++-- rtengine/improcfun.h | 2 +- rtengine/procevents.h | 2 + rtengine/procparams.cc | 28 +++++++ rtengine/procparams.h | 2 + rtengine/refreshmap.cc | 4 +- rtengine/rtengine.h | 2 +- rtengine/rtthumbnail.cc | 4 +- rtengine/simpleprocess.cc | 8 +- rtgui/colorappearance.cc | 136 ++++++++++++++++++++++++++++++++-- rtgui/colorappearance.h | 14 +++- rtgui/paramsedited.cc | 12 +++ rtgui/paramsedited.h | 2 + 16 files changed, 223 insertions(+), 32 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 346c96a2d..a4b2d0442 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1276,9 +1276,9 @@ TP_COARSETRAF_TOOLTIP_HFLIP;Flip horizontally. TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Editor Tabs Mode,\nAlt-[ - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. -TP_COLORAPP_ADAPTSCENE;Scene luminosity +TP_COLORAPP_ADAPTSCENE;Scene absolute luminance TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. -TP_COLORAPP_ADAPTVIEWING;Viewing luminosity (cd/m²) +TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. TP_COLORAPP_ALGO;Algorithm @@ -1325,6 +1325,8 @@ TP_COLORAPP_LIGHT;Lightness (J) TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. TP_COLORAPP_MODEL;WP Model TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions.\n\nFree temp+green + CAT02 + [output]: temp and green are selected bu user, output device's white balance is set in Viewing Conditions. +TP_COLORAPP_NEUTRAL;Reset +TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_RSTPRO;Red & skin-tones protection TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- @@ -1349,7 +1351,9 @@ TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] -TP_COLORAPP_YB;Yb (mean luminance) +TP_COLORAPP_YB;Yb%(mean luminance) +TP_COLORAPP_YBSCENE;Yb%(mean luminance) +TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic TP_COLORTONING_BALANCE;Balance diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index a93238664..441c7a47d 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -958,9 +958,9 @@ void Crop::update (int todo) } if (settings->ciecamfloat) { - float d, dj; // not used after this block + float d, dj, yb; // not used after this block parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1); } else { double dd, dj; // not used after this block diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index e3ee91540..f63b6ba48 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -746,7 +746,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) int begh = 0; int endh = pH; - float d, dj; + float d, dj, yb; bool execsharp = false; if(!ncie) { @@ -766,14 +766,14 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, 1); + ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); - if(params.colorappearance.autodegree && acListener && params.colorappearance.enabled) { + if((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } - if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap); //real value of adapt scene luminosity + if((params.colorappearance.autoadapscen || params.colorappearance.autoybscen) && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged(adap, (int) yb); //real value of adapt scene luminosity and Yb scene } readyphase++; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index 5d56f01fd..dadf0cd2b 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -1487,7 +1487,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt) { if (params->colorappearance.enabled) { @@ -1514,7 +1514,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Yw; Yw = 1.0; double Xw, Zw; - float f, nc, yb = 0.f, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; + float f, nc, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d float xwd, ywd, zwd, xws, yws, zws; int alg = 0; @@ -1834,7 +1834,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //evaluate lightness, contrast } - if (settings->viewinggreySc == 0) { //auto + + + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0f; } else if (mean < 30.f) { @@ -1858,8 +1862,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { yb = 90.0f; } - } else if (settings->viewinggreySc == 1) { - yb = 18.0f; //fixed +// } else if (settings->viewinggreySc == 1) { + } else { + yb = (float) params->colorappearance.ybscen; } const bool highlight = params->toneCurve.hrenabled; //Get the value if "highlight reconstruction" is activated diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 5ef287139..115046067 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -226,7 +226,7 @@ public: void luminanceCurve (LabImage* lold, LabImage* lnew, LUTf &curve); void ciecam_02float (CieImage* ncie, float adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 88aaf0e3f..cf7f50704 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -509,6 +509,8 @@ enum ProcEvent { EvCATAutoDegreeout = 479, EvCATtempsc = 480, EvCATgreensc = 481, + EvCATybscen = 482, + EvCATAutoyb = 483, NUMOFEVENTS diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 071732243..fa97d5f7d 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1159,6 +1159,8 @@ void ProcParams::setDefaults () colorappearance.badpixsl = 0; colorappearance.adapscen = 2000.0; colorappearance.autoadapscen = true; + colorappearance.ybscen = 18; + colorappearance.autoybscen = true; colorappearance.algo = "No"; colorappearance.wbmodel = "RawT"; colorappearance.jlight = 0.0; @@ -2169,6 +2171,14 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_boolean ("Color appearance", "AutoAdapscen", colorappearance.autoadapscen); } + if (!pedited || pedited->colorappearance.ybscen) { + keyFile.set_integer ("Color appearance", "YbScene", colorappearance.ybscen); + } + + if (!pedited || pedited->colorappearance.autoybscen) { + keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen); + } + if (!pedited || pedited->colorappearance.surrsource) { keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); } @@ -5136,6 +5146,22 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "YbScene")) { + colorappearance.ybscen = keyFile.get_integer ("Color appearance", "YbScene"); + + if (pedited) { + pedited->colorappearance.ybscen = true; + } + } + + if (keyFile.has_key ("Color appearance", "Autoybscen")) { + colorappearance.autoybscen = keyFile.get_boolean ("Color appearance", "Autoybscen"); + + if (pedited) { + pedited->colorappearance.autoybscen = true; + } + } + if (keyFile.has_key ("Color appearance", "SurrSource")) { colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); @@ -8302,6 +8328,8 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.surround == other.colorappearance.surround && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen + && colorappearance.ybscen == other.colorappearance.ybscen + && colorappearance.autoybscen == other.colorappearance.autoybscen && colorappearance.adaplum == other.colorappearance.adaplum && colorappearance.badpixsl == other.colorappearance.badpixsl && colorappearance.wbmodel == other.colorappearance.wbmodel diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 636308800..405609823 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -597,6 +597,8 @@ public: Glib::ustring surround; double adapscen; bool autoadapscen; + int ybscen; + bool autoybscen; double adaplum; int badpixsl; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 732e2e05d..5400a2e47 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -508,7 +508,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // EvCATDegreeout LUMINANCECURVE, // EvCATAutoDegreeout LUMINANCECURVE, // EvCATtempsc - LUMINANCECURVE // EvCATgreensc + LUMINANCECURVE, // EvCATgreensc + LUMINANCECURVE, // EvCATybscen + LUMINANCECURVE // EvCATAutoyb }; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index fb93f8715..6678ac1fd 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -274,7 +274,7 @@ class AutoCamListener public : virtual ~AutoCamListener() {} virtual void autoCamChanged (double ccam, double ccamout) {} - virtual void adapCamChanged (double cadap) {} + virtual void adapCamChanged (double cadap, int ybscn) {} }; class AutoChromaListener diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 41e52a16e..4388b6184 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -1260,7 +1260,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei 16); int begh = 0, endh = labView->H; bool execsharp = false; - float d, dj; + float d, dj, yb; float fnum = fnumber;// F number float fiso = iso;// ISO float fspeed = shutter;//speed @@ -1296,7 +1296,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei CAMMean = NAN; CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, rtt); + ipf.ciecam_02float (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, sk, execsharp, d, dj, yb, rtt); delete cieView; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index d72a69bab..de13cfc0e 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1122,16 +1122,16 @@ private: if (params.sharpening.enabled) { if(settings->ciecamfloat) { - float d, dj; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); + float d, dj, yb; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); } } else { if(settings->ciecamfloat) { - float d, dj; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, 1); + float d, dj, yb; + ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index ddf120c1a..95caa1450 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -191,6 +191,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); p1VBox->pack_start (*adapscen); + ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); + + if (ybscen->delay < options.adjusterMaxDelay) { + ybscen->delay = options.adjusterMaxDelay; + } + + ybscen->throwOnButtonRelease(); + ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); + ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP")); + p1VBox->pack_start (*ybscen); + p1Frame->add (*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -199,12 +210,19 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 1 frame + + expadjust = Gtk::manage(new MyExpander(false, M ("TP_COLORAPP_LABEL_CAM02"))); + setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) ); +/* Gtk::Frame *p2Frame; // Vertical box container for the content of the Process 1 frame Gtk::VBox *p2VBox; p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); p2Frame->set_label_align (0.025, 0.5); +*/ + Gtk::VBox *p2VBox; p2VBox = Gtk::manage ( new Gtk::VBox()); p2VBox->set_spacing (2); @@ -429,10 +447,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" - p2Frame->add (*p2VBox); +// p2Frame->add (*p2VBox); + expadjust->add (*p2VBox, false); + expadjust->setLevel(2); + pack_start (*expadjust); - - pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); +// pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -450,7 +470,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 1000., 0.1, 16.)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); if (adaplum->delay < options.adjusterMaxDelay) { adaplum->delay = options.adjusterMaxDelay; @@ -481,7 +501,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); - ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 50, 1, 18)); + ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); tempout->show(); greenout->show(); @@ -533,6 +553,21 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" badpixsl->throwOnButtonRelease(); badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); + + + //reset button + neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL"))); + setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); + setExpandAlignProperties (resetImg, false, false, Gtk::ALIGN_CENTER, Gtk::ALIGN_CENTER); + neutral->set_image (*resetImg); + neutral->set_tooltip_text (M ("TP_COLORAPP_NEUTRAL_TIP")); + neutralconn = neutral->signal_pressed().connect ( sigc::mem_fun (*this, &ColorAppearance::neutral_pressed) ); + neutral->show(); + + //------------- + + pack_start (*neutral); // ------------------------ Listening events @@ -545,6 +580,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->setAdjusterListener (this); degreeout->setAdjusterListener (this); adapscen->setAdjusterListener (this); + ybscen->setAdjusterListener (this); adaplum->setAdjusterListener (this); badpixsl->setAdjusterListener (this); jlight->setAdjusterListener (this); @@ -575,7 +611,58 @@ ColorAppearance::~ColorAppearance () delete curveEditorG3; } +void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander) +{ + if (event->button == 3) { + expadjust->set_expanded(expadjust == expander); + } +} +void ColorAppearance::writeOptions(std::vector &tpOpen) +{ + tpOpen.push_back (expadjust->get_expanded ()); +} + +void ColorAppearance::updateToolState(std::vector &tpOpen) +{ + if(tpOpen.size() >= 1) { + expadjust->set_expanded(tpOpen.at(0)); + } +} + +void ColorAppearance::neutral_pressed () +{ + jlight->resetValue (false); + qbright->resetValue (false); + chroma->resetValue (false); + schroma->resetValue (false); + mchroma->resetValue (false); + rstprotection->resetValue (false); + contrast->resetValue (false); + qcontrast->resetValue (false); + colorh->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + ybout->resetValue (false); + tempsc->resetValue (false); + greensc->resetValue (false); + badpixsl->resetValue (false); + wbmodel->set_active (0); + toneCurveMode->set_active (0); + toneCurveMode2->set_active (0); + toneCurveMode3->set_active (0); + shape->reset(); + shape2->reset(); + shape3->reset(); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); +} bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) { @@ -606,6 +693,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) degree->setEditedState (pedited->colorappearance.degree ? Edited : UnEdited); degreeout->setEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -632,6 +720,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) degree->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegree); degreeout->setAutoInconsistent (multiImage && !pedited->colorappearance.autodegreeout); adapscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoadapscen); + ybscen->setAutoInconsistent (multiImage && !pedited->colorappearance.autoybscen); set_inconsistent (multiImage && !pedited->colorappearance.enabled); shape->setUnChanged (!pedited->colorappearance.curve); @@ -736,6 +825,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) lastAutoDegree = pp->colorappearance.autodegree; lastAutoAdapscen = pp->colorappearance.autoadapscen; lastAutoDegreeout = pp->colorappearance.autodegreeout; + lastAutoybscen = pp->colorappearance.autoybscen; degree->setValue (pp->colorappearance.degree); degree->setAutoValue (pp->colorappearance.autodegree); @@ -743,6 +833,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) adapscen->setAutoValue (pp->colorappearance.autoadapscen); degreeout->setValue (pp->colorappearance.degreeout); degreeout->setAutoValue (pp->colorappearance.autodegreeout); + ybscen->setValue (pp->colorappearance.ybscen); + ybscen->setAutoValue (pp->colorappearance.autoybscen); adaplum->setValue (pp->colorappearance.adaplum); badpixsl->setValue (pp->colorappearance.badpixsl); @@ -785,6 +877,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.enabled = getEnabled(); pp->colorappearance.adapscen = adapscen->getValue (); pp->colorappearance.autoadapscen = adapscen->getAutoValue (); + pp->colorappearance.ybscen = ybscen->getValue (); + pp->colorappearance.autoybscen = ybscen->getAutoValue (); pp->colorappearance.adaplum = adaplum->getValue (); pp->colorappearance.badpixsl = badpixsl->getValue (); pp->colorappearance.jlight = jlight->getValue (); @@ -842,6 +936,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.degreeout = degreeout->getEditedState (); pedited->colorappearance.adapscen = adapscen->getEditedState (); pedited->colorappearance.adaplum = adaplum->getEditedState (); + pedited->colorappearance.ybscen = ybscen->getEditedState (); pedited->colorappearance.badpixsl = badpixsl->getEditedState (); pedited->colorappearance.jlight = jlight->getEditedState (); pedited->colorappearance.qbright = qbright->getEditedState (); @@ -855,6 +950,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.autodegree = !degree->getAutoInconsistent(); pedited->colorappearance.autodegreeout = !degreeout->getAutoInconsistent(); pedited->colorappearance.autoadapscen = !adapscen->getAutoInconsistent(); + pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); @@ -1140,6 +1236,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefault (defParams->colorappearance.degree); degreeout->setDefault (defParams->colorappearance.degreeout); adapscen->setDefault (defParams->colorappearance.adapscen); + ybscen->setDefault (defParams->colorappearance.ybscen); adaplum->setDefault (defParams->colorappearance.adaplum); badpixsl->setDefault (defParams->colorappearance.badpixsl); jlight->setDefault (defParams->colorappearance.jlight); @@ -1161,6 +1258,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefaultEditedState (pedited->colorappearance.degree ? Edited : UnEdited); degreeout->setDefaultEditedState (pedited->colorappearance.degreeout ? Edited : UnEdited); adapscen->setDefaultEditedState (pedited->colorappearance.adapscen ? Edited : UnEdited); + ybscen->setDefaultEditedState (pedited->colorappearance.ybscen ? Edited : UnEdited); adaplum->setDefaultEditedState (pedited->colorappearance.adaplum ? Edited : UnEdited); badpixsl->setDefaultEditedState (pedited->colorappearance.badpixsl ? Edited : UnEdited); jlight->setDefaultEditedState (pedited->colorappearance.jlight ? Edited : UnEdited); @@ -1182,6 +1280,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit degree->setDefaultEditedState (Irrelevant); degreeout->setDefaultEditedState (Irrelevant); adapscen->setDefaultEditedState (Irrelevant); + ybscen->setDefaultEditedState (Irrelevant); adaplum->setDefaultEditedState (Irrelevant); badpixsl->setDefaultEditedState (Irrelevant); jlight->setDefaultEditedState (Irrelevant); @@ -1227,9 +1326,10 @@ bool ColorAppearance::autoCamComputed_ () return false; } -void ColorAppearance::adapCamChanged (double cadap) +void ColorAppearance::adapCamChanged (double cadap, int ybsc) { nextCadap = cadap; + nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->adapCamComputed_(); @@ -1245,6 +1345,7 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); + ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1283,6 +1384,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); + } else if (a == ybscen) { + listener->panelChanged (EvCATybscen, a->getTextValue()); } else if (a == adaplum) { listener->panelChanged (EvCATAdapLum, a->getTextValue()); } else if (a == badpixsl) { @@ -1352,6 +1455,15 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) lastAutoAdapscen = adapscen->getAutoValue(); + if (ybscen->getAutoInconsistent()) { + ybscen->setAutoInconsistent (false); + ybscen->setAutoValue (false); + } else if (lastAutoybscen) { + ybscen->setAutoInconsistent (true); + } + + lastAutoybscen = ybscen->getAutoValue(); + } if (listener && (multiImage || getEnabled()) ) { @@ -1387,6 +1499,16 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } } + if (a == ybscen) { + if (ybscen->getAutoInconsistent()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_UNCHANGED")); + } else if (ybscen->getAutoValue()) { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_ENABLED")); + } else { + listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); + } + } + } } @@ -1512,6 +1634,7 @@ void ColorAppearance::setBatchMode (bool batchMode) degreeout->showEditedCB (); adapscen->showEditedCB (); adaplum->showEditedCB (); + ybscen->showEditedCB (); badpixsl->showEditedCB (); jlight->showEditedCB (); qbright->showEditedCB (); @@ -1573,6 +1696,7 @@ void ColorAppearance::trimValues (rtengine::procparams::ProcParams* pp) degree->trimValue (pp->colorappearance.degree); degreeout->trimValue (pp->colorappearance.degreeout); adapscen->trimValue (pp->colorappearance.adapscen); + ybscen->trimValue (pp->colorappearance.ybscen); adaplum->trimValue (pp->colorappearance.adaplum); badpixsl->trimValue (pp->colorappearance.badpixsl); jlight->trimValue (pp->colorappearance.jlight); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index f5102be95..9c2a84d67 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -59,7 +59,7 @@ public: // void sharpcie_toggled (); void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); - void adapCamChanged (double cadap); + void adapCamChanged (double cadap, int ybscn); bool adapCamComputed_ (); void curveChanged (CurveEditor* ce); @@ -69,6 +69,7 @@ public: bool curveMode2Changed_ (); void curveMode3Changed (); bool curveMode3Changed_ (); + void neutral_pressed (); void expandCurve (bool isExpanded); bool isCurveExpanded (); @@ -78,10 +79,13 @@ public: void trimValues (rtengine::procparams::ProcParams* pp); void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI); virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller); + void updateToolState (std::vector &tpOpen); + void writeOptions (std::vector &tpOpen); private: bool bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); bool srTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip); + void foldAllButMe (GdkEventButton* event, MyExpander *expander); Glib::RefPtr bgTTips; Glib::RefPtr srTTips; @@ -90,6 +94,7 @@ private: Adjuster* degree; Adjuster* adapscen; + Adjuster* ybscen; Adjuster* adaplum; Adjuster* degreeout; Adjuster* badpixsl; @@ -108,6 +113,8 @@ private: Adjuster* tempsc; Adjuster* greensc; + MyExpander* expadjust; + MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; MyComboBoxText* toneCurveMode3; @@ -119,6 +126,7 @@ private: Gtk::CheckButton* datacie; Gtk::CheckButton* tonecie; // Gtk::CheckButton* sharpcie; + Gtk::Button* neutral; MyComboBoxText* surround; sigc::connection surroundconn; @@ -128,7 +136,7 @@ private: sigc::connection algoconn; sigc::connection surrconn; sigc::connection gamutconn, datacieconn, tonecieconn /*,badpixconn , sharpcieconn*/; - sigc::connection tcmodeconn, tcmode2conn, tcmode3conn; + sigc::connection tcmodeconn, tcmode2conn, tcmode3conn, neutralconn; CurveEditorGroup* curveEditorG; CurveEditorGroup* curveEditorG2; CurveEditorGroup* curveEditorG3; @@ -137,9 +145,11 @@ private: DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; double nextCcam, nextCcamout, nextCadap; + int nextYbscn; bool lastAutoDegree; bool lastAutoAdapscen; bool lastAutoDegreeout; + bool lastAutoybscen; bool lastsurr; bool lastgamut; bool lastdatacie; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d3e17b810..6de9cbb0c 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -180,6 +180,8 @@ void ParamsEdited::set (bool v) colorappearance.surround = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; + colorappearance.ybscen = v; + colorappearance.autoybscen = v; colorappearance.adaplum = v; colorappearance.badpixsl = v; colorappearance.wbmodel = v; @@ -708,6 +710,8 @@ void ParamsEdited::initFrom (const std::vector colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; + colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen; + colorappearance.autoybscen = colorappearance.autoybscen && p.colorappearance.autoybscen == other.colorappearance.autoybscen; colorappearance.adaplum = colorappearance.adaplum && p.colorappearance.adaplum == other.colorappearance.adaplum; colorappearance.badpixsl = colorappearance.badpixsl && p.colorappearance.badpixsl == other.colorappearance.badpixsl; colorappearance.wbmodel = colorappearance.wbmodel && p.colorappearance.wbmodel == other.colorappearance.wbmodel; @@ -1739,6 +1743,14 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.adapscen = mods.colorappearance.adapscen; } + if (colorappearance.autoybscen) { + toEdit.colorappearance.autoybscen = mods.colorappearance.autoybscen; + } + + if (colorappearance.ybscen) { + toEdit.colorappearance.ybscen = mods.colorappearance.ybscen; + } + if (colorappearance.adaplum) { toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4c0bcd38e..ef32bea63 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -292,9 +292,11 @@ public: bool degreeout; bool autodegreeout; bool autoadapscen; + bool autoybscen; bool surround; bool adapscen; bool adaplum; + bool ybscen; bool badpixsl; bool wbmodel; bool algo; From 0bb824e2c1a98edd8fb35ef335a90231ba3f43c6 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 14 Aug 2017 08:21:35 +0200 Subject: [PATCH 09/17] Other changes for Elle --- rtdata/languages/default | 1 + rtengine/dcrop.cc | 4 +- rtengine/improccoordinator.cc | 8 ++- rtengine/improcfun.cc | 70 ++++++++++++++------ rtengine/improcfun.h | 2 +- rtengine/procparams.cc | 14 ++++ rtengine/procparams.h | 1 + rtengine/rtengine.h | 4 +- rtengine/simpleprocess.cc | 8 +-- rtgui/colorappearance.cc | 119 +++++++++++++++++++++++++++++----- rtgui/colorappearance.h | 7 +- rtgui/paramsedited.cc | 6 ++ rtgui/paramsedited.h | 1 + 13 files changed, 199 insertions(+), 46 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index a4b2d0442..0a99ae040 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1347,6 +1347,7 @@ TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_SATUR;Saturation +TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5001\nD55 temp=5500\nD65 temp=6504\nD75 temp=7500 TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] diff --git a/rtengine/dcrop.cc b/rtengine/dcrop.cc index 441c7a47d..df75e7a0e 100644 --- a/rtengine/dcrop.cc +++ b/rtengine/dcrop.cc @@ -962,10 +962,10 @@ void Crop::update (int todo) parent->ipf.ciecam_02float (cieCrop, float (adap), begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, d, dj, yb, 1); } else { - double dd, dj; // not used after this block + double dd, dj, yb; // not used after this block parent->ipf.ciecam_02 (cieCrop, adap, begh, endh, 1, 2, labnCrop, ¶ms, parent->customColCurve1, parent->customColCurve2, parent->customColCurve3, - dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, 1); + dummy, dummy, parent->CAMBrightCurveJ, parent->CAMBrightCurveQ, parent->CAMMean, 5, skip, execsharp, dd, dj, yb, 1); } } else { // CIECAM is disbaled, we free up its image buffer to save some space diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index f63b6ba48..d288a23c1 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -772,10 +772,14 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); } - if((params.colorappearance.autoadapscen || params.colorappearance.autoybscen) && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap, (int) yb); //real value of adapt scene luminosity and Yb scene + if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged(adap); //real value of adapt scene } + if(params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { + acListener->ybCamChanged((int) yb); //real value Yb scene + } + readyphase++; } else { // CIECAM is disabled, we free up its image buffer to save some space diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index dadf0cd2b..f67ba3660 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -210,7 +210,7 @@ void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const Pro // Copyright (c) 2012 Jacques Desmis void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve2, const ColorAppearance & customColCurve3, - LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt) + LUTu & histLCAM, LUTu & histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt) { if (params->colorappearance.enabled) { //int lastskip; @@ -266,7 +266,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double Xwout, Zwout; double Xwsc, Zwsc; - double f, c, nc, yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; + double f = 0., c = 0., nc = 0., yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; double xws, yws, zws; @@ -280,36 +280,50 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if (params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00; c = 0.69; nc = 1.00; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9; + c = 0.59; + nc = 0.9; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8; + c = 0.525; + nc = 0.8; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8; + c = 0.41; + nc = 0.8; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0, c2 = 0.69, nc2 = 1.0; } else if (params->colorappearance.surround == "Dim") { f2 = 0.9; c2 = 0.59; nc2 = 0.9; - f = 1.0, c = 0.69, nc = 1.0; } else if (params->colorappearance.surround == "Dark") { f2 = 0.8; c2 = 0.525; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8; c2 = 0.41; nc2 = 0.8; - f = 1.0, c = 0.69, nc = 1.0; } - +/* //scene condition for surround if (params->colorappearance.surrsource) { f = 0.85; // if user => source image has surround very dark c = 0.55; nc = 0.85; } - +*/ //with which algorithme if (params->colorappearance.algo == "JC") { alg = 0; @@ -513,7 +527,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } - if (settings->viewinggreySc == 0) { //auto + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0; } else if (mean < 30.f) { @@ -537,7 +553,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } else { yb = 90.0; } - } + } else { + yb = params->colorappearance.ybscen; + } if (settings->viewinggreySc == 1) { yb = 18.0; @@ -1514,7 +1532,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int float Yw; Yw = 1.0; double Xw, Zw; - float f, nc, la, c, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; + float f = 0.f, nc = 0.f, la, c = 0.f, xw, yw, zw, f2 = 1.f, c2 = 1.f, nc2 = 1.f, yb2; float fl, n, nbb, ncb, aw; //d float xwd, ywd, zwd, xws, yws, zws; int alg = 0; @@ -1531,36 +1549,50 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int ColorTemp::temp2mulxyz (params->colorappearance.tempout, params->colorappearance.greenout, "Custom", Xwout, Zwout); ColorTemp::temp2mulxyz (params->colorappearance.tempsc, params->colorappearance.greensc, "Custom", Xwsc, Zwsc); - //viewing condition for surround - if (params->colorappearance.surround == "Average") { + //viewing condition for surrsrc + if (params->colorappearance.surrsrc == "Average") { f = 1.00f; c = 0.69f; nc = 1.00f; + } else if (params->colorappearance.surrsrc == "Dim") { + f = 0.9f; + c = 0.59f; + nc = 0.9f; + } else if (params->colorappearance.surrsrc == "Dark") { + f = 0.8f; + c = 0.525f; + nc = 0.8f; + } else if (params->colorappearance.surrsrc == "ExtremelyDark") { + f = 0.8f; + c = 0.41f; + nc = 0.8f; + } + + + //viewing condition for surround + if (params->colorappearance.surround == "Average") { f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; } else if (params->colorappearance.surround == "Dim") { f2 = 0.9f; c2 = 0.59f; nc2 = 0.9f; - f = 1.0f, c = 0.69f, nc = 1.0f; } else if (params->colorappearance.surround == "Dark") { f2 = 0.8f; c2 = 0.525f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; } else if (params->colorappearance.surround == "ExtremelyDark") { f2 = 0.8f; c2 = 0.41f; nc2 = 0.8f; - f = 1.0f, c = 0.69f, nc = 1.0f; } - +/* //scene condition for surround if (params->colorappearance.surrsource) { f = 0.85f; // if user => source image has surround very dark c = 0.55f; nc = 0.85f; } - +*/ //with which algorithm if (params->colorappearance.algo == "JC") { alg = 0; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index 115046067..d9cd17ef5 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -229,7 +229,7 @@ public: LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, float &d, float &dj, float &yb, int rtt); void ciecam_02 (CieImage* ncie, double adap, int begh, int endh, int pW, int pwb, LabImage* lab, const ProcParams* params, const ColorAppearance & customColCurve1, const ColorAppearance & customColCurve, const ColorAppearance & customColCurve3, - LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, int rtt); + LUTu &histLCAM, LUTu &histCCAM, LUTf & CAMBrightCurveJ, LUTf & CAMBrightCurveQ, float &mean, int Iterates, int scale, bool execsharp, double &d, double &dj, double &yb, int rtt); void chromiLuminanceCurve (PipetteBuffer *pipetteBuffer, int pW, LabImage* lold, LabImage* lnew, LUTf &acurve, LUTf &bcurve, LUTf & satcurve, LUTf & satclcurve, LUTf &clcurve, LUTf &curve, bool utili, bool autili, bool butili, bool ccutili, bool cclutili, bool clcutili, LUTu &histCCurve, LUTu &histLurve); void vibrance (LabImage* lab);//Jacques' vibrance void colorCurve (LabImage* lold, LabImage* lnew); diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index fa97d5f7d..6114dc1b5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -1155,6 +1155,7 @@ void ProcParams::setDefaults () colorappearance.degreeout = 90; colorappearance.autodegreeout = true; colorappearance.surround = "Average"; + colorappearance.surrsrc = "Average"; colorappearance.adaplum = 16; colorappearance.badpixsl = 0; colorappearance.adapscen = 2000.0; @@ -2110,6 +2111,10 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } + if (!pedited || pedited->colorappearance.surrsrc) { + keyFile.set_string ("Color appearance", "Surrsrc", colorappearance.surrsrc); + } + // if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); if (!pedited || pedited->colorappearance.adaplum) { keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); @@ -5025,6 +5030,14 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) } } + if (keyFile.has_key ("Color appearance", "Surrsrc")) { + colorappearance.surrsrc = keyFile.get_string ("Color appearance", "Surrsrc"); + + if (pedited) { + pedited->colorappearance.surrsrc = true; + } + } + // if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } if (keyFile.has_key ("Color appearance", "AdaptLum")) { colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); @@ -8326,6 +8339,7 @@ bool ProcParams::operator== (const ProcParams& other) && colorappearance.degreeout == other.colorappearance.degreeout && colorappearance.autodegreeout == other.colorappearance.autodegreeout && colorappearance.surround == other.colorappearance.surround + && colorappearance.surrsrc == other.colorappearance.surrsrc && colorappearance.adapscen == other.colorappearance.adapscen && colorappearance.autoadapscen == other.colorappearance.autoadapscen && colorappearance.ybscen == other.colorappearance.ybscen diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 405609823..53561ce16 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -595,6 +595,7 @@ public: eCTCModeId curveMode3; Glib::ustring surround; + Glib::ustring surrsrc; double adapscen; bool autoadapscen; int ybscen; diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index 6678ac1fd..cd4cd4942 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -274,7 +274,9 @@ class AutoCamListener public : virtual ~AutoCamListener() {} virtual void autoCamChanged (double ccam, double ccamout) {} - virtual void adapCamChanged (double cadap, int ybscn) {} + virtual void adapCamChanged (double cadap) {} + virtual void ybCamChanged (int yb) {} + }; class AutoChromaListener diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index de13cfc0e..9d5daa936 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -1125,16 +1125,16 @@ private: float d, dj, yb; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { - double dd, dj; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } else { if(settings->ciecamfloat) { float d, dj, yb; ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { - double dd, dj; - ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, 1); + double dd, dj, yb; + ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 95caa1450..91172cf6a 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -147,9 +147,25 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p1VBox->pack_start (*degree); - surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); - surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); - p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); + // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); + // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + + + Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); + surrHBox1->set_spacing (2); + surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); + Gtk::Label* surrLabel1 = Gtk::manage (new Gtk::Label (M ("TP_COLORAPP_SURROUND") + ":")); + surrHBox1->pack_start (*surrLabel1, Gtk::PACK_SHRINK); + surrsrc = Gtk::manage (new MyComboBoxText ()); + surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DIM")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_DARK")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surrsrc->set_active (0); + surrHBox1->pack_start (*surrsrc); + p1VBox->pack_start (*surrHBox1); + + // p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); wbmHBox->set_spacing (2); @@ -173,6 +189,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); + tempsc->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); tempsc->show(); greensc->show(); @@ -502,6 +519,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); + tempout->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); tempout->show(); greenout->show(); @@ -572,10 +590,11 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // ------------------------ Listening events - surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); + // surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::wbmodelChanged) ); algoconn = algo->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::algoChanged) ); surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); + surrsrcconn = surrsrc->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsrcChanged) ); degree->setAdjusterListener (this); degreeout->setAdjusterListener (this); @@ -654,6 +673,9 @@ void ColorAppearance::neutral_pressed () shape->reset(); shape2->reset(); shape3->reset(); + gamutconn.block (true); + gamut->set_active (true); + gamutconn.block (false); degree->setAutoValue (true); degree->resetValue (false); adapscen->resetValue (false); @@ -710,7 +732,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) contrast->setEditedState (pedited->colorappearance.contrast ? Edited : UnEdited); qcontrast->setEditedState (pedited->colorappearance.qcontrast ? Edited : UnEdited); colorh->setEditedState (pedited->colorappearance.colorh ? Edited : UnEdited); - surrsource->set_inconsistent (!pedited->colorappearance.surrsource); +// surrsource->set_inconsistent (!pedited->colorappearance.surrsource); gamut->set_inconsistent (!pedited->colorappearance.gamut); // badpix->set_inconsistent (!pedited->colorappearance.badpix); datacie->set_inconsistent (!pedited->colorappearance.datacie); @@ -744,6 +766,25 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) setEnabled (pp->colorappearance.enabled); + surrsrcconn.block (true); + + if (pedited && !pedited->colorappearance.surrsrc) { + surrsrc->set_active (4); + } else if (pp->colorappearance.surrsrc == "Average") { + surrsrc->set_active (0); + } else if (pp->colorappearance.surrsrc == "Dim") { + surrsrc->set_active (1); + } else if (pp->colorappearance.surrsrc == "Dark") { + surrsrc->set_active (2); + } else if (pp->colorappearance.surrsrc == "ExtremelyDark") { + surrsrc->set_active (3); + } + + surrsrcconn.block (false); + // Have to be manually called to handle initial state update + surrsrcChanged(); + + surroundconn.block (true); if (pedited && !pedited->colorappearance.surround) { @@ -762,6 +803,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update surroundChanged(); + + wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { @@ -796,9 +839,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update algoChanged(); - surrconn.block (true); - surrsource->set_active (pp->colorappearance.surrsource); - surrconn.block (false); + // surrconn.block (true); + // surrsource->set_active (pp->colorappearance.surrsource); + // surrconn.block (false); gamutconn.block (true); gamut->set_active (pp->colorappearance.gamut); gamutconn.block (false); @@ -815,7 +858,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_active (pp->colorappearance.sharpcie); // sharpcieconn.block (false); - lastsurr = pp->colorappearance.surrsource; + // lastsurr = pp->colorappearance.surrsource; lastgamut = pp->colorappearance.gamut; // lastbadpix=pp->colorappearance.badpix; lastdatacie = pp->colorappearance.datacie; @@ -890,7 +933,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.qcontrast = qcontrast->getValue (); pp->colorappearance.colorh = colorh->getValue (); pp->colorappearance.rstprotection = rstprotection->getValue (); - pp->colorappearance.surrsource = surrsource->get_active(); + // pp->colorappearance.surrsource = surrsource->get_active(); pp->colorappearance.gamut = gamut->get_active(); // pp->colorappearance.badpix = badpix->get_active(); pp->colorappearance.datacie = datacie->get_active(); @@ -953,9 +996,10 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.autoybscen = !ybscen->getAutoInconsistent(); pedited->colorappearance.enabled = !get_inconsistent(); pedited->colorappearance.surround = surround->get_active_text() != M ("GENERAL_UNCHANGED"); + pedited->colorappearance.surrsrc = surrsrc->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.algo = algo->get_active_text() != M ("GENERAL_UNCHANGED"); - pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); + // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); pedited->colorappearance.gamut = !gamut->get_inconsistent(); // pedited->colorappearance.badpix = !badpix->get_inconsistent(); pedited->colorappearance.datacie = !datacie->get_inconsistent(); @@ -975,6 +1019,17 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } + if (surrsrc->get_active_row_number() == 0) { + pp->colorappearance.surrsrc = "Average"; + } else if (surrsrc->get_active_row_number() == 1) { + pp->colorappearance.surrsrc = "Dim"; + } else if (surrsrc->get_active_row_number() == 2) { + pp->colorappearance.surrsrc = "Dark"; + } else if (surrsrc->get_active_row_number() == 3) { + pp->colorappearance.surrsrc = "ExtremelyDark"; + } + + if (surround->get_active_row_number() == 0) { pp->colorappearance.surround = "Average"; } else if (surround->get_active_row_number() == 1) { @@ -1079,7 +1134,7 @@ bool ColorAppearance::curveMode3Changed_ () return false; } - +/* void ColorAppearance::surrsource_toggled () { @@ -1104,7 +1159,7 @@ void ColorAppearance::surrsource_toggled () } } } - +*/ void ColorAppearance::gamut_toggled () { @@ -1326,10 +1381,9 @@ bool ColorAppearance::autoCamComputed_ () return false; } -void ColorAppearance::adapCamChanged (double cadap, int ybsc) +void ColorAppearance::adapCamChanged (double cadap) { nextCadap = cadap; - nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->adapCamComputed_(); @@ -1345,12 +1399,35 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); - ybscen->setValue (nextYbscn); +// ybscen->setValue (nextYbscn); enableListener (); return false; } +void ColorAppearance::ybCamChanged (int ybsc) +{ + nextYbscn = ybsc; + + const auto func = [] (gpointer data) -> gboolean { + static_cast (data)->ybCamComputed_(); + return FALSE; + }; + + idle_register.add (func, this); +} + +bool ColorAppearance::ybCamComputed_ () +{ + + disableListener (); +// degree->setEnabled (true); +// adapscen->setValue (nextCadap); + ybscen->setValue (nextYbscn); + enableListener (); + + return false; +} void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller) { @@ -1528,6 +1605,15 @@ void ColorAppearance::enabledChanged () } } +void ColorAppearance::surrsrcChanged () +{ + + if (listener && (multiImage || getEnabled()) ) { + listener->panelChanged (EvCATsurr, surrsrc->get_active_text ()); + } +} + + void ColorAppearance::surroundChanged () { @@ -1652,6 +1738,7 @@ void ColorAppearance::setBatchMode (bool batchMode) greensc->showEditedCB (); surround->append (M ("GENERAL_UNCHANGED")); + surrsrc->append (M ("GENERAL_UNCHANGED")); wbmodel->append (M ("GENERAL_UNCHANGED")); algo->append (M ("GENERAL_UNCHANGED")); toneCurveMode->append (M ("GENERAL_UNCHANGED")); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 9c2a84d67..4afed28cb 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -49,6 +49,7 @@ public: // void adjusterAdapToggled (Adjuster* a, bool newval); void enabledChanged (); void surroundChanged (); + void surrsrcChanged (); void wbmodelChanged (); void algoChanged (); void surrsource_toggled (); @@ -59,8 +60,10 @@ public: // void sharpcie_toggled (); void autoCamChanged (double ccam, double ccamout); bool autoCamComputed_ (); - void adapCamChanged (double cadap, int ybscn); + void adapCamChanged (double cadap); bool adapCamComputed_ (); + void ybCamChanged (int yb); + bool ybCamComputed_ (); void curveChanged (CurveEditor* ce); void curveMode1Changed (); @@ -127,6 +130,8 @@ private: Gtk::CheckButton* tonecie; // Gtk::CheckButton* sharpcie; Gtk::Button* neutral; + MyComboBoxText* surrsrc; + sigc::connection surrsrcconn; MyComboBoxText* surround; sigc::connection surroundconn; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 6de9cbb0c..eb0b77085 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -178,6 +178,7 @@ void ParamsEdited::set (bool v) colorappearance.degreeout = v; colorappearance.autodegreeout = v; colorappearance.surround = v; + colorappearance.surrsrc = v; colorappearance.adapscen = v; colorappearance.autoadapscen = v; colorappearance.ybscen = v; @@ -708,6 +709,7 @@ void ParamsEdited::initFrom (const std::vector colorappearance.degreeout = colorappearance.degreeout && p.colorappearance.degreeout == other.colorappearance.degreeout; colorappearance.autodegreeout = colorappearance.autodegreeout && p.colorappearance.autodegreeout == other.colorappearance.autodegreeout; colorappearance.surround = colorappearance.surround && p.colorappearance.surround == other.colorappearance.surround; + colorappearance.surrsrc = colorappearance.surrsrc && p.colorappearance.surrsrc == other.colorappearance.surrsrc; colorappearance.adapscen = colorappearance.adapscen && p.colorappearance.adapscen == other.colorappearance.adapscen; colorappearance.autoadapscen = colorappearance.autoadapscen && p.colorappearance.autoadapscen == other.colorappearance.autoadapscen; colorappearance.ybscen = colorappearance.ybscen && p.colorappearance.ybscen == other.colorappearance.ybscen; @@ -1735,6 +1737,10 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten toEdit.colorappearance.surround = mods.colorappearance.surround; } + if (colorappearance.surrsrc) { + toEdit.colorappearance.surrsrc = mods.colorappearance.surrsrc; + } + if (colorappearance.autoadapscen) { toEdit.colorappearance.autoadapscen = mods.colorappearance.autoadapscen; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index ef32bea63..35e3c80b8 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -294,6 +294,7 @@ public: bool autoadapscen; bool autoybscen; bool surround; + bool surrsrc; bool adapscen; bool adaplum; bool ybscen; From 0c7b59ece877d60eb9c4943ba5d29cd0eb444420 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 14 Aug 2017 17:49:11 +0200 Subject: [PATCH 10/17] Suppress ciecam options --- rtdata/languages/default | 2 +- rtgui/options.cc | 8 ++++---- rtgui/preferences.cc | 12 ++++++------ rtgui/preferences.h | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 0a99ae040..bdd1c9c3b 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1347,7 +1347,7 @@ TP_COLORAPP_TCMODE_LABEL2;Curve mode 2 TP_COLORAPP_TCMODE_LABEL3;Curve chroma mode TP_COLORAPP_TCMODE_LIGHTNESS;Lightness TP_COLORAPP_TCMODE_SATUR;Saturation -TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5001\nD55 temp=5500\nD65 temp=6504\nD75 temp=7500 +TP_COLORAPP_TEMP_TOOLTIP;To select an illuminant always Tint=1.\nA temp=2856\nD50 temp=5003\nD55 temp=5503\nD65 temp=6504\nD75 temp=7504 TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] diff --git a/rtgui/options.cc b/rtgui/options.cc index 9ee4b7538..7293a3a63 100644 --- a/rtgui/options.cc +++ b/rtgui/options.cc @@ -642,7 +642,7 @@ void Options::setDefaults () #endif // rtSettings.viewingdevice = 0; // rtSettings.viewingdevicegrey = 3; - rtSettings.viewinggreySc = 1; + // rtSettings.viewinggreySc = 1; rtSettings.leveldnv = 2; rtSettings.leveldnti = 0; rtSettings.leveldnaut = 0; @@ -1557,11 +1557,11 @@ int Options::readFromFile (Glib::ustring fname) rtSettings.viewingdevicegrey = keyFile.get_integer ("Color Management", "grey"); } */ - +/* if (keyFile.has_key ("Color Management", "greySc")) { rtSettings.viewinggreySc = keyFile.get_integer ("Color Management", "greySc"); } - +*/ if (keyFile.has_key ("Color Management", "CBDLArtif")) { rtSettings.artifact_cbdl = keyFile.get_double ("Color Management", "CBDLArtif"); } @@ -2133,7 +2133,7 @@ int Options::saveToFile (Glib::ustring fname) keyFile.set_boolean ("Color Management", "MonitorBPC", rtSettings.monitorBPC); //keyFile.set_integer ("Color Management", "view", rtSettings.viewingdevice); //keyFile.set_integer ("Color Management", "grey", rtSettings.viewingdevicegrey); - keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); +// keyFile.set_integer ("Color Management", "greySc", rtSettings.viewinggreySc); keyFile.set_string ("Color Management", "AdobeRGB", rtSettings.adobe); keyFile.set_string ("Color Management", "ProPhoto", rtSettings.prophoto); diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index bac6a08d1..3caff71c3 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -878,14 +878,14 @@ Gtk::Widget* Preferences::getColorManagementPanel () grey->append (M("PREFERENCES_GREY30")); grey->append (M("PREFERENCES_GREY40")); */ - +/* Gtk::Label* greySclab = Gtk::manage (new Gtk::Label (M ("PREFERENCES_GREYSC") + ":", Gtk::ALIGN_START)); setExpandAlignProperties (greySclab, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); greySc = Gtk::manage (new Gtk::ComboBoxText ()); setExpandAlignProperties (greySc, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_CENTER); greySc->append (M ("PREFERENCES_GREYSCA")); greySc->append (M ("PREFERENCES_GREYSC18")); - +*/ Gtk::Frame* fcielab = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_CIEART_FRAME")) ); setExpandAlignProperties (fcielab, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -900,8 +900,8 @@ Gtk::Widget* Preferences::getColorManagementPanel () colo->attach (*greylab, 0, 2, 1, 1); colo->attach (*grey, 1, 2, 1, 1); */ - colo->attach (*greySclab, 0, 3, 1, 1); - colo->attach (*greySc, 1, 3, 1, 1); +// colo->attach (*greySclab, 0, 3, 1, 1); +// colo->attach (*greySc, 1, 3, 1, 1); cbciecamfloat = Gtk::manage (new Gtk::CheckButton (M ("PREFERENCES_CIEART_LABEL"))); setExpandAlignProperties (cbciecamfloat, false, false, Gtk::ALIGN_START, Gtk::ALIGN_CENTER); colo->attach (*cbciecamfloat, 0, 4, 2, 1); @@ -1716,7 +1716,7 @@ void Preferences::storePreferences () moptions.rtSettings.iccDirectory = iccDir->get_filename (); // moptions.rtSettings.viewingdevice = view->get_active_row_number (); // moptions.rtSettings.viewingdevicegrey = grey->get_active_row_number (); - moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); +// moptions.rtSettings.viewinggreySc = greySc->get_active_row_number (); // moptions.rtSettings.autocielab = cbAutocielab->get_active (); moptions.rtSettings.ciecamfloat = cbciecamfloat->get_active (); moptions.rtSettings.HistogramWorking = ckbHistogramWorking->get_active (); @@ -1876,7 +1876,7 @@ void Preferences::fillPreferences () // view->set_active (moptions.rtSettings.viewingdevice); // grey->set_active (moptions.rtSettings.viewingdevicegrey); - greySc->set_active (moptions.rtSettings.viewinggreySc); +// greySc->set_active (moptions.rtSettings.viewinggreySc); dnv->set_active (moptions.rtSettings.leveldnv); dnti->set_active (moptions.rtSettings.leveldnti); dnliss->set_active (moptions.rtSettings.leveldnliss); diff --git a/rtgui/preferences.h b/rtgui/preferences.h index d392082bb..1a86c64a9 100644 --- a/rtgui/preferences.h +++ b/rtgui/preferences.h @@ -122,9 +122,9 @@ class Preferences : public Gtk::Dialog, public ProfileStoreListener Gtk::SpinButton* panFactor; Gtk::CheckButton* rememberZoomPanCheckbutton; - Gtk::ComboBoxText* view; - Gtk::ComboBoxText* grey; - Gtk::ComboBoxText* greySc; + // Gtk::ComboBoxText* view; +// Gtk::ComboBoxText* grey; +// Gtk::ComboBoxText* greySc; Gtk::ComboBoxText* dnv; Gtk::ComboBoxText* dnti; Gtk::ComboBoxText* dnaut; From 986bbaa2cf65e0d6413203c7ef3a21cbbf42cb9f Mon Sep 17 00:00:00 2001 From: Desmis Date: Tue, 15 Aug 2017 08:44:35 +0200 Subject: [PATCH 11/17] Change behavior sliders La --- rtgui/colorappearance.cc | 103 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 5 deletions(-) diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 91172cf6a..98f5d0ecc 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -27,6 +27,9 @@ #define MINGREEN0 0.8 #define MAXGREEN0 1.2 +#define MINLA0 0.01 +#define MAXLA0 16384 +#define CENTERLA0 500 using namespace rtengine; using namespace rtengine::procparams; @@ -59,6 +62,90 @@ static double wbSlider2Temp (double sval) return temp; } +static double wbSlider2la (double sval) +{ + + // slider range: 0 - 10000 + double la; + + if (sval <= 500) { + // linear below center-temp + la= MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + double x = (sval - 500) / 500; // x 0..1 + double y = x * slope + (1.0 - slope) * pow (x, 4.0); + //double y = pow(x, 4.0); + la = CENTERLA0 + y * (MAXLA0 - CENTERLA0); + } + + if (la < MINLA0) { + la = MINLA0; + } + + if (la > MAXLA0) { + la = MAXLA0; + } + + return la; +} + +static double wbla2Slider (double la) +{ + + double sval; + + if (la <= CENTERLA0) { + sval = ((la - MINLA0) / (CENTERLA0 - MINLA0)) * 500.0; + } else { + const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); + const double y = (la - CENTERLA0) / (MAXLA0 - CENTERLA0); + double x = pow (y, 0.25); // rough guess of x, will be a little lower + double k = 0.1; + bool add = true; + + // the y=f(x) function is a mess to invert, therefore we have this trial-refinement loop instead. + // from tests, worst case is about 20 iterations, ie no problem + for (;;) { + double y1 = x * slope + (1.0 - slope) * pow (x, 4.0); + + if (500 * fabs (y1 - y) < 0.1) { + break; + } + + if (y1 < y) { + if (!add) { + k /= 2; + } + + x += k; + add = true; + } else { + if (add) { + k /= 2; + } + + x -= k; + add = false; + } + } + + sval = 500.0 + x * 500.0; + } + + if (sval < 0) { + sval = 0; + } + + if (sval > 16384.) { + sval = 16384.; + } + + return sval; +} + + + static double wbTemp2Slider (double temp) { @@ -197,7 +284,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p1VBox->pack_start (*greensc); - adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.001, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + // adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adapscen->delay < options.adjusterMaxDelay) { adapscen->delay = options.adjusterMaxDelay; @@ -486,8 +574,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - - adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); + + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + // adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); + adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adaplum->delay < options.adjusterMaxDelay) { adaplum->delay = options.adjusterMaxDelay; @@ -510,12 +603,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); - +/* Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - +*/ tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); From f63b1f5e9ab45e26fa7feae9d5dec04825c27f00 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 19:34:41 +0200 Subject: [PATCH 12/17] Renamed TooWaGrey-ExtraBright to TooWaGrey - Average Surround --- ...ght-GTK3-20_.css => TooWaGrey - Average Surround-GTK3-20_.css} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename rtdata/themes/{TooWaGrey-ExtraBright-GTK3-20_.css => TooWaGrey - Average Surround-GTK3-20_.css} (100%) diff --git a/rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css b/rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaGrey-ExtraBright-GTK3-20_.css rename to rtdata/themes/TooWaGrey - Average Surround-GTK3-20_.css From d6cc8d300b693f4cb0cfaaada1ef02d5e8c3bbea Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 19:51:04 +0200 Subject: [PATCH 13/17] Renamed TooWaBlue theme variants --- ...WaBlue-Bright-GTK3-20_.css => TooWaBlue - Bright-GTK3-20_.css} | 0 ...{TooWaBlue-Dark-GTK3-20_.css => TooWaBlue - Dark-GTK3-20_.css} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename rtdata/themes/{TooWaBlue-Bright-GTK3-20_.css => TooWaBlue - Bright-GTK3-20_.css} (100%) rename rtdata/themes/{TooWaBlue-Dark-GTK3-20_.css => TooWaBlue - Dark-GTK3-20_.css} (100%) diff --git a/rtdata/themes/TooWaBlue-Bright-GTK3-20_.css b/rtdata/themes/TooWaBlue - Bright-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaBlue-Bright-GTK3-20_.css rename to rtdata/themes/TooWaBlue - Bright-GTK3-20_.css diff --git a/rtdata/themes/TooWaBlue-Dark-GTK3-20_.css b/rtdata/themes/TooWaBlue - Dark-GTK3-20_.css similarity index 100% rename from rtdata/themes/TooWaBlue-Dark-GTK3-20_.css rename to rtdata/themes/TooWaBlue - Dark-GTK3-20_.css From da4630ef221609919956e6f7f9376240f2cabb94 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Tue, 15 Aug 2017 20:08:41 +0200 Subject: [PATCH 14/17] Removed "Default" from "Default Language" and "Default Theme", regenerated translations. --- rtdata/languages/Catala | 18 +++++++++++++----- rtdata/languages/Chinese (Simplified) | 16 ++++++++++++---- rtdata/languages/Chinese (Traditional) | 18 +++++++++++++----- rtdata/languages/Czech | 16 ++++++++++++++-- rtdata/languages/Dansk | 18 +++++++++++++----- rtdata/languages/Deutsch | 16 ++++++++++++++-- rtdata/languages/English (UK) | 18 +++++++++++++----- rtdata/languages/English (US) | 18 +++++++++++++----- rtdata/languages/Espanol | 12 ++++++++++-- rtdata/languages/Euskara | 18 +++++++++++++----- rtdata/languages/Francais | 16 ++++++++++++++-- rtdata/languages/Greek | 18 +++++++++++++----- rtdata/languages/Hebrew | 18 +++++++++++++----- rtdata/languages/Italiano | 12 ++++++++++-- rtdata/languages/Japanese | 12 ++++++++++-- rtdata/languages/Latvian | 18 +++++++++++++----- rtdata/languages/Magyar | 18 +++++++++++++----- rtdata/languages/Nederlands | 12 ++++++++++-- rtdata/languages/Norsk BM | 18 +++++++++++++----- rtdata/languages/Polish | 12 ++++++++++-- rtdata/languages/Polish (Latin Characters) | 12 ++++++++++-- rtdata/languages/Portugues (Brasil) | 18 +++++++++++++----- rtdata/languages/Russian | 14 +++++++++++--- rtdata/languages/Serbian (Cyrilic Characters) | 12 ++++++++++-- rtdata/languages/Serbian (Latin Characters) | 12 ++++++++++-- rtdata/languages/Slovak | 18 +++++++++++++----- rtdata/languages/Suomi | 18 +++++++++++++----- rtdata/languages/Swedish | 12 ++++++++++-- rtdata/languages/Turkish | 18 +++++++++++++----- rtdata/languages/default | 12 ++++++------ rtgui/preferences.cc | 4 ++-- 31 files changed, 358 insertions(+), 114 deletions(-) diff --git a/rtdata/languages/Catala b/rtdata/languages/Catala index 2f8093799..19d1ac3b2 100644 --- a/rtdata/languages/Catala +++ b/rtdata/languages/Catala @@ -518,8 +518,6 @@ PREFERENCES_DARKFRAMESHOTS;trets PREFERENCES_DARKFRAMETEMPLATES;plantilles PREFERENCES_DATEFORMAT;Format de data PREFERENCES_DATEFORMATHINT;Podeu fer servir les següents cadenes formatades:\n%y : any\n%m : mes\n%d : dia\n\nPer exemple, el format de data hongarès és:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma per omissió -PREFERENCES_DEFAULTTHEME;Tema per omissió PREFERENCES_DIRDARKFRAMES;Carpeta de marcs foscos PREFERENCES_DIRHOME;directori home PREFERENCES_DIRLAST;Últim directori usat @@ -966,6 +964,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1018,6 +1017,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !GENERAL_AUTO;Automatic !GENERAL_CLOSE;Close !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_174;CIECAM02 @@ -1305,6 +1305,9 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1398,7 +1401,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1415,7 +1419,8 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1428,6 +1433,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1469,6 +1475,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1602,7 +1609,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1627,6 +1634,7 @@ ZOOMPANEL_ZOOMOUT;Allunya\nDrecera: - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Chinese (Simplified) b/rtdata/languages/Chinese (Simplified) index c726095bb..4a9120abb 100644 --- a/rtdata/languages/Chinese (Simplified) +++ b/rtdata/languages/Chinese (Simplified) @@ -417,8 +417,6 @@ PREFERENCES_D60;6000K PREFERENCES_D65;6500K PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;可以使用下列控制符:\n%y : 年\n%m : 月h\n%d : 日\n\n例如,中文日期格式:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;缺省语言 -PREFERENCES_DEFAULTTHEME;默认主题 PREFERENCES_DIRHOME;用户文件路径 PREFERENCES_DIRLAST;上次访问路径 PREFERENCES_DIROTHER;其他 @@ -797,6 +795,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !CURVEEDITOR_PARAMETRIC;Parametric !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -878,6 +877,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -1223,6 +1223,9 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1331,6 +1334,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DARKFRAME;Dark-Frame !PREFERENCES_DARKFRAMEFOUND;Found !PREFERENCES_DARKFRAMESHOTS;shots @@ -1354,7 +1358,8 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1369,6 +1374,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1431,6 +1437,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1540,7 +1547,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_LABEL_SCENE;Scene Conditions !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1559,6 +1566,7 @@ ZOOMPANEL_ZOOMOUT;缩放拉远\n快捷键: - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Chinese (Traditional) b/rtdata/languages/Chinese (Traditional) index 24b6aed27..e2d457c14 100644 --- a/rtdata/languages/Chinese (Traditional) +++ b/rtdata/languages/Chinese (Traditional) @@ -253,8 +253,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;高光提示 PREFERENCES_DATEFORMAT;日期格式 PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;預設語言 -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;用戶檔路徑 PREFERENCES_DIRLAST;上次訪問路徑 PREFERENCES_DIROTHER;其他 @@ -457,6 +455,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -582,6 +581,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -963,6 +963,9 @@ TP_WBALANCE_TEMPERATURE;色溫 !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1134,7 +1137,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1163,7 +1167,8 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1178,6 +1183,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1243,6 +1249,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1403,7 +1410,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1428,6 +1435,7 @@ TP_WBALANCE_TEMPERATURE;色溫 !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Czech b/rtdata/languages/Czech index 7b64b64dc..d9646626c 100644 --- a/rtdata/languages/Czech +++ b/rtdata/languages/Czech @@ -1001,8 +1001,6 @@ PREFERENCES_DATEFORMAT;Formát data PREFERENCES_DATEFORMATHINT;Lze použít následující formátovací řetězce:\n%y\t- rok (year)\n%m\t- měsíc (month)\n%d\t- den (day)\n\nNapříklad český formát data:\n%d. %m. %y PREFERENCES_DAUB_LABEL;Použít D6 Daubechiesové vlnky namísto D4 PREFERENCES_DAUB_TOOLTIP;Nástroje Redukce šumu a Úrovně vlnky používají Daubechiesové mateřskou vlnku. Pokud místo D4 vyberete D6 zvýší se počet ortogonálních Daubechiesové koeficientů a pravděpodobně zvýší kvalitu úrovní malého měřítka. Není zde rozdíl ve spotřebě paměti nebo délce zpracování. -PREFERENCES_DEFAULTLANG;Výchozí jazyk -PREFERENCES_DEFAULTTHEME;Výchozí vzhled PREFERENCES_DIRDARKFRAMES;Složka tmavých snímků PREFERENCES_DIRHOME;Domovská složka PREFERENCES_DIRLAST;Poslední navštívená složka @@ -2167,3 +2165,17 @@ ZOOMPANEL_ZOOMFITSCREEN;Přizpůsobit obrázek obrazovce\nZkratka: f ZOOMPANEL_ZOOMIN;Přiblížit\nZkratka: + ZOOMPANEL_ZOOMOUT;Oddálit\nZkratka: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/Dansk b/rtdata/languages/Dansk index 710b92b0e..fc4451910 100644 --- a/rtdata/languages/Dansk +++ b/rtdata/languages/Dansk @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal miniaturehøjde PREFERENCES_CLIPPINGIND;Indikator for udbrændte områder PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruge følgende formatindstillinger:\n%y : år\n%m : måned\n%d : dag\n\nDet typiske datoformat i danmark er:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Sprog -PREFERENCES_DEFAULTTHEME;Tema PREFERENCES_DIRHOME;Standardmappe PREFERENCES_DIRLAST;Sidst anvendte mappe PREFERENCES_DIROTHER;Andet @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Deutsch b/rtdata/languages/Deutsch index 79b976185..48218cc8d 100644 --- a/rtdata/languages/Deutsch +++ b/rtdata/languages/Deutsch @@ -1021,8 +1021,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Die folgenden Variablen können verwendet werden:\n%y : Jahr\n%m : Monat\n%d : Tag\n\nBeispiele:\n%d.%m.%y (übliche deutsche Datumsschreibweise)\n%y-%m-%d (Datumsformat nach ISO 8601 und EN 28601) PREFERENCES_DAUB_LABEL;Benutze Daubechies D6-Wavelets anstatt D4 PREFERENCES_DAUB_TOOLTIP;Rauschreduzierung und Waveletebenen verwenden ein Debauchies Mutter-Wavelet. Wenn Sie D6 statt D4 wählen, erhöhen Sie die Anzahl der orthogonalen Daubechies-Koeffizienten, was die Qualität bei niedrigen Ebenen verbessern kann. Es gibt keinen Unterschied zwischen D4 und D6 im Speicherverbrauch oder in der Verarbeitungszeit. -PREFERENCES_DEFAULTLANG;Sprache für Menüs und Dialoge -PREFERENCES_DEFAULTTHEME;Oberflächendesign PREFERENCES_DIRDARKFRAMES;Dunkelbild-Verzeichnis PREFERENCES_DIRHOME;Benutzer-Verzeichnis PREFERENCES_DIRLAST;Zuletzt geöffnetes Verzeichnis @@ -2187,3 +2185,17 @@ ZOOMPANEL_ZOOMFITSCREEN;An Bildschirm anpassen\nTaste: f ZOOMPANEL_ZOOMIN;Hineinzoomen\nTaste: + ZOOMPANEL_ZOOMOUT;Herauszoomen\nTaste: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/English (UK) b/rtdata/languages/English (UK) index a9baed7ed..de265b960 100644 --- a/rtdata/languages/English (UK) +++ b/rtdata/languages/English (UK) @@ -58,7 +58,6 @@ TP_COLORAPP_CHROMA_M_TOOLTIP;Colourfulness in CIECAM02 differs from L*a*b* and R TP_COLORAPP_CURVEEDITOR3;Colour curve TP_COLORAPP_CURVEEDITOR3_TOOLTIP;Adjust either chroma, saturation or colourfulness.\n\nShows the histogram of chromaticity (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of C, s or M after CIECAM02.\n\nC, s and M are not shown in the main histogram panel.\nFor final output refer to the main histogram panel. TP_COLORAPP_LABEL;CIE Colour Appearance Model 2002 -TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Colour Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Colour Management. TP_COLORAPP_SURROUND_TOOLTIP;Changes tones and colours to take into account the viewing conditions of the output device.\n\nAverage: Average light environment (standard). The image will not change.\n\nDim: Dim environment (TV). The image will become slighty dark.\n\nDark: Dark environment (projector). The image will become more dark.\n\nExtremly Dark: Extremly dark environment (cutsheet). The image will become very dark. TP_COLORAPP_TCMODE_COLORF;Colourfulness TP_COLORTONING_COLOR;Colour @@ -141,6 +140,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -334,6 +334,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -786,6 +787,9 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -1023,7 +1027,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1035,8 +1040,6 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -1068,7 +1071,8 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1087,6 +1091,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_INTENT_PERCEPTUAL;Perceptual !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1172,6 +1177,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1359,6 +1365,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1381,6 +1388,7 @@ TP_WBALANCE_EQBLUERED_TOOLTIP;Allows to deviate from the normal behaviour of "wh !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/English (US) b/rtdata/languages/English (US) index d768da5e7..2f32e4419 100644 --- a/rtdata/languages/English (US) +++ b/rtdata/languages/English (US) @@ -37,6 +37,7 @@ !CURVEEDITOR_TOOLTIPSAVE;Save current curve. !CURVEEDITOR_TYPE;Type: !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -235,6 +236,7 @@ !GENERAL_SAVE;Save !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -705,6 +707,9 @@ !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT;Add !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !HISTORY_SNAPSHOT;Snapshot @@ -953,7 +958,8 @@ !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -965,8 +971,6 @@ !PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -!PREFERENCES_DEFAULTLANG;Default Language -!PREFERENCES_DEFAULTTHEME;Default Theme !PREFERENCES_DIRDARKFRAMES;Dark-frames directory !PREFERENCES_DIRHOME;Home directory !PREFERENCES_DIRLAST;Last visited directory @@ -998,7 +1002,8 @@ !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1020,6 +1025,7 @@ !PREFERENCES_INTENT_RELATIVE;Relative Colorimetric !PREFERENCES_INTENT_SATURATION;Saturation !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1111,6 +1117,7 @@ !PREFERENCES_TAB_IMPROC;Image Processing !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1315,7 +1322,7 @@ !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1340,6 +1347,7 @@ !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Espanol b/rtdata/languages/Espanol index 9d7e4a78c..057c30f88 100644 --- a/rtdata/languages/Espanol +++ b/rtdata/languages/Espanol @@ -765,8 +765,6 @@ PREFERENCES_DARKFRAMESHOTS;disparos PREFERENCES_DARKFRAMETEMPLATES;plantillas PREFERENCES_DATEFORMAT;Formato de fecha PREFERENCES_DATEFORMATHINT;Puede usar las siguientes variables :\n%y : año\n%m : mes\n%d : dia\n\nPor ejemplo, la fecha en formato Húngaro es: \n%y/%m/%d -PREFERENCES_DEFAULTLANG;Idioma predeterminado -PREFERENCES_DEFAULTTHEME;Tema predeterminado PREFERENCES_DIRDARKFRAMES;Carpeta con las Tomas Negras PREFERENCES_DIRHOME;Carpeta de usuario PREFERENCES_DIRLAST;Última carpeta visitada @@ -1507,6 +1505,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1536,6 +1535,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1698,6 +1698,9 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1760,11 +1763,13 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1772,6 +1777,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1809,6 +1815,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1826,6 +1833,7 @@ ZOOMPANEL_ZOOMOUT;Reducir Zoom\nAtajo: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Euskara b/rtdata/languages/Euskara index af995e34e..bc7f738f4 100644 --- a/rtdata/languages/Euskara +++ b/rtdata/languages/Euskara @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Itzal/argi moztuen adierazlea PREFERENCES_DATEFORMAT;Data formatua PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Hizkuntza -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Etxe karpeta PREFERENCES_DIRLAST;Azkena ikusitako karpeta PREFERENCES_DIROTHER;Besterik @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Tenperatura !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Francais b/rtdata/languages/Francais index 65cf503eb..9d9f32b3b 100644 --- a/rtdata/languages/Francais +++ b/rtdata/languages/Francais @@ -962,8 +962,6 @@ PREFERENCES_DATEFORMAT;Format PREFERENCES_DATEFORMATHINT;Vous pouvez utiliser les paramètres de chaînes formatées suivants:\n%y : année\n%m : mois\n%d : jour\n\nPar exemple, le format de date française est:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Utiliser les ondelettes de Daubechies D6 au lieu de D4 PREFERENCES_DAUB_TOOLTIP;Les outils de Réduction de Bruit et de Niveaux d'Ondelettes utilisent une ondelette de Debauchie mère. Si vous choisissez D6 au lieu de D4 vous augmentez le nombre de coéf. orthogonaux de Daubechies et augmentez probablement la qualité des niveaux de taille moyenne. Il n'y a pas de différence de consommation mémoire ou de temps de traitement entre les deux. -PREFERENCES_DEFAULTLANG;Langue par défaut -PREFERENCES_DEFAULTTHEME;Thème par défaut PREFERENCES_DIRDARKFRAMES;Dossier des images de Trame Noire PREFERENCES_DIRHOME;Racine de mes documents personnels PREFERENCES_DIRLAST;Dernier dossier visité @@ -2129,3 +2127,17 @@ ZOOMPANEL_ZOOMFITSCREEN;Affiche l'image entière\nRaccourci: f ZOOMPANEL_ZOOMIN;Zoom Avant\nRaccourci: + ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: - +!!!!!!!!!!!!!!!!!!!!!!!!! +! Untranslated keys follow; remove the ! prefix after an entry is translated. +!!!!!!!!!!!!!!!!!!!!!!!!! + +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) diff --git a/rtdata/languages/Greek b/rtdata/languages/Greek index 9b9ef809f..ec127d7cd 100644 --- a/rtdata/languages/Greek +++ b/rtdata/languages/Greek @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Ένδειξη ψαλιδίσματος PREFERENCES_DATEFORMAT;Διάταξη ημερομηνίας PREFERENCES_DATEFORMATHINT;YΜπορείτε να χρησιμοποιήσετε τις εξής εντολές μορφοποίησης:\n%y : χρονολογία\n%m : μήνας\n%d : ημέρα\n\nΓια παράδειγμα, η μορφοποίηση ημερομηνίας στην Ελλάδα είναι:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Προεπιλεγμένη γλώσσα -PREFERENCES_DEFAULTTHEME;Προεπιλεγμένο θέμα PREFERENCES_DIRHOME;Τοποθεσία "Home" PREFERENCES_DIRLAST;Τελευταία τοποθεσία που χρησιμοποιήθηκε PREFERENCES_DIROTHER;Άλλο @@ -448,6 +446,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -577,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -958,6 +958,9 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1131,7 +1134,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1160,7 +1164,8 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1175,6 +1180,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1240,6 +1246,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Θερμοκρασία !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Hebrew b/rtdata/languages/Hebrew index 7a310e3af..9dc402fd7 100644 --- a/rtdata/languages/Hebrew +++ b/rtdata/languages/Hebrew @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;סימון קיצוץ PREFERENCES_DATEFORMAT;צורת תאריך PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;שפה ברירת המחדל -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;תיקיית הבית PREFERENCES_DIRLAST;תיקיה האחרונה שביקרתי בה PREFERENCES_DIROTHER;אחר @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;מידת חום !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;מידת חום !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Italiano b/rtdata/languages/Italiano index d6e441796..d26005bfa 100644 --- a/rtdata/languages/Italiano +++ b/rtdata/languages/Italiano @@ -667,8 +667,6 @@ PREFERENCES_DARKFRAMESHOTS;fotogrammi PREFERENCES_DARKFRAMETEMPLATES;modelli PREFERENCES_DATEFORMAT;Formato della data PREFERENCES_DATEFORMATHINT;Puoi usare le seguenti stringhe di formattazione:\n%y : anno\n%m : mese\n%d : giorno\n\nPer esempio, il formato italiano per la data è:\n%d/%m/%y -PREFERENCES_DEFAULTLANG;Lingua predefinita -PREFERENCES_DEFAULTTHEME;Tema predefinito PREFERENCES_DIRDARKFRAMES;Cartella dei fotogrammi di fondo (Dark Frame) PREFERENCES_DIRHOME;Cartella personale dell'utente (home directory) PREFERENCES_DIRLAST;Ultima cartella visitata @@ -1338,6 +1336,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1366,6 +1365,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_256;NR - Median type !HISTORY_MSG_257;Color Toning @@ -1571,6 +1571,9 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1630,12 +1633,14 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1643,6 +1648,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1680,6 +1686,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1697,6 +1704,7 @@ ZOOMPANEL_ZOOMOUT;Rimpicciolisci.\nScorciatoia: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Japanese b/rtdata/languages/Japanese index 74249d80d..1ce714311 100644 --- a/rtdata/languages/Japanese +++ b/rtdata/languages/Japanese @@ -889,8 +889,6 @@ PREFERENCES_DATEFORMAT;日付の形式 PREFERENCES_DATEFORMATHINT;次の書式を使用することができます:\n%y : 年\n%m : 月\n%d : 日\n\n例として, ハンガリアン記法の日付:\n%y/%m/%d PREFERENCES_DAUB_LABEL;ドビッシー関数のタイプ D4の代わりにD6を使う PREFERENCES_DAUB_TOOLTIP;ノイズ低減とウェーブレットのレベルツールはマザーウェーブレットにドビッシーを使っています。このタイプでD4の代わりにD6を選択すると、直交系であるドビッシーの係数が増えるので、恐らくスケールの小さいレベルは質が向上するでしょう。タイプを変えても処理時間やメモリー使用量に影響はありません。 -PREFERENCES_DEFAULTLANG;デフォルトの言語 -PREFERENCES_DEFAULTTHEME;デフォルトテーマ PREFERENCES_DIRDARKFRAMES;ダークフレーム・ディレクトリ PREFERENCES_DIRHOME;ホーム・ディレクトリ PREFERENCES_DIRLAST;最近参照したディレクトリ @@ -1877,6 +1875,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1895,6 +1894,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !FILEBROWSER_SHOWORIGINALHINT;Show only original images.\n\nWhen several images exist with the same filename but different extensions, the one considered original is the one whose extension is nearest the top of the parsed extensions list in Preferences > File Browser > Parsed Extensions. !GENERAL_APPLY;Apply !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_407;Retinex - Method !HISTORY_MSG_408;Retinex - Radius @@ -1949,6 +1949,9 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1983,6 +1986,9 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PARTIALPASTE_RETINEX;Retinex !PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language !PREFERENCES_MONINTENT;Default rendering intent !PREFERENCES_MONITOR;Monitor !PREFERENCES_MONPROFILE;Default color profile @@ -1997,6 +2003,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SELECTFONT_COLPICKER;Select Color Picker's font !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TUNNELMETADATA;Copy Exif/IPTC/XMP unchanged to output file !PROFILEPANEL_PDYNAMIC;Dynamic !SAVEDLG_SUBSAMP_TOOLTIP;Best compression:\nJ:a:b 4:2:0\nh/v 2/2\nChroma halved horizontally and vertically.\n\nBalanced:\nJ:a:b 4:2:2\nh/v 2/1\nChroma halved horizontally.\n\nBest quality:\nJ:a:b 4:4:4\nh/v 1/1\nNo chroma subsampling. @@ -2007,6 +2014,7 @@ ZOOMPANEL_ZOOMOUT;ズームアウト\nショートカット: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_DIRPYRDENOISE_3X3;3×3 !TP_DIRPYRDENOISE_3X3_SOFT;3×3 soft !TP_DIRPYRDENOISE_5X5;5×5 diff --git a/rtdata/languages/Latvian b/rtdata/languages/Latvian index f65d66ad4..c0ee7ec5f 100644 --- a/rtdata/languages/Latvian +++ b/rtdata/languages/Latvian @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Keša maksimālais sīktēla augstums PREFERENCES_CLIPPINGIND;Cirpšanas pazīme PREFERENCES_DATEFORMAT;Datuma formāts PREFERENCES_DATEFORMATHINT;Jūs varat lietot šāduas formatēšanas parametrus:\n%y : gads\n%m : mēnesis\n%d : diena\n\nPiemēram, ungāru datuma formāts ir:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Noklusētā valoda -PREFERENCES_DEFAULTTHEME;Noklusētā tēma PREFERENCES_DIRHOME;Mājas mape PREFERENCES_DIRLAST;Pēdējā lietotā mape PREFERENCES_DIROTHER;Cita @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatūra !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Magyar b/rtdata/languages/Magyar index ed93eeb98..557c31685 100644 --- a/rtdata/languages/Magyar +++ b/rtdata/languages/Magyar @@ -499,8 +499,6 @@ PREFERENCES_DARKFRAMESHOTS;kép PREFERENCES_DARKFRAMETEMPLATES;sablonok PREFERENCES_DATEFORMAT;Dátumformátum PREFERENCES_DATEFORMATHINT;A következő jeleket lehet használni:\n%y : év\n%m : hónap\n%d : nap\n\nPéldául a magyar dátumformátum:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Alapértelmezett nyelv -PREFERENCES_DEFAULTTHEME;Alapértelmezett kinézet PREFERENCES_DIRDARKFRAMES;Dark frame könyvtára PREFERENCES_DIRHOME;Saját könyvtár PREFERENCES_DIRLAST;Utoljára látogatott könyvtár @@ -881,6 +879,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -939,6 +938,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !GENERAL_CLOSE;Close !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. !HISTORY_MSG_166;Exposure - Reset @@ -1234,6 +1234,9 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1334,7 +1337,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_CUSTPROFBUILDKEYFORMAT;Keys format !PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1351,7 +1355,8 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1364,6 +1369,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1406,6 +1412,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1553,7 +1560,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1578,6 +1585,7 @@ ZOOMPANEL_ZOOMOUT;Kicsinyítés - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Nederlands b/rtdata/languages/Nederlands index 737b8e252..2963f835f 100644 --- a/rtdata/languages/Nederlands +++ b/rtdata/languages/Nederlands @@ -974,8 +974,6 @@ PREFERENCES_DATEFORMAT;Datumformaat PREFERENCES_DATEFORMATHINT;U kunt de volgende formaten gebruiken:\n%y : jaar\n%m : maand\n%d : dag\n\nHet Nederlandse datumformaat is bijvoorbeeld:\n%d/%m/%y PREFERENCES_DAUB_LABEL;Gebruik Daubechies D6 wavelets in plaats van D4 PREFERENCES_DAUB_TOOLTIP;De Ruisonderdrukking en Wavelet niveaus gebruiken de Debauchies moeder wavelet. Als je D6 gebruikt in plaats van D4 vergroot het aantal orthogonale Daubechies coëfficiënten en dit verbeterd waarschijnlijk de kwaliteit van de lage niveaus. -PREFERENCES_DEFAULTLANG;Standaardtaal -PREFERENCES_DEFAULTTHEME;Standaardthema PREFERENCES_DIRDARKFRAMES;Map met donkerframes PREFERENCES_DIRHOME;Standaardmap PREFERENCES_DIRLAST;Laatst bezochte map @@ -2141,11 +2139,21 @@ ZOOMPANEL_ZOOMOUT;Zoom uit\nSneltoets: - ! Untranslated keys follow; remove the ! prefix after an entry is translated. !!!!!!!!!!!!!!!!!!!!!!!!! +!DONT_SHOW_AGAIN;Don't show this message again. +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_441;Retinex - Gain transmission !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !MAIN_MSG_TOOMANYOPENEDITORS;Too many open editors.\nPlease close an editor to continue. +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 +!PREFERENCES_LANG;Language !PREFERENCES_PROFILESAVEBOTH;Save processing profile both to the cache and next to the input file !PREFERENCES_PROFILESAVELOCATION;Processing profile saving location +!PREFERENCES_THEME;Theme +!TP_COLORAPP_YB;Yb (mean luminance) !TP_RAW_IMAGENUM_TOOLTIP;Some raw files consist of several sub-images (Pentax Pixel Shift, Pentax 3-in-1 HDR, Canon Dual Pixel).\n\nWhen using any demosaicing method other than Pixel Shift, this selects which sub-image is used.\n\nWhen using the Pixel Shift demosaicing method on a Pixel Shift raw, all sub-images are used, and this selects which sub-image should be used for moving parts. !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL;Equalize per channel !TP_RAW_PIXELSHIFTEQUALBRIGHTCHANNEL_TOOLTIP;Enabled: Equalize the RGB channels individually.\nDisabled: Use same equalization factor for all channels. diff --git a/rtdata/languages/Norsk BM b/rtdata/languages/Norsk BM index 1291fd772..12f9ce694 100644 --- a/rtdata/languages/Norsk BM +++ b/rtdata/languages/Norsk BM @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maksimal Thumbnail Høyde PREFERENCES_CLIPPINGIND;Markerings-indikasjon PREFERENCES_DATEFORMAT;Datoformat PREFERENCES_DATEFORMATHINT;Du kan bruke følgende formattering:\n%y : år\n%m : måned\n%d : dag\n\nF. eks. er ungarsk datoformat:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Programspråk -PREFERENCES_DEFAULTTHEME;Standard tema PREFERENCES_DIRHOME;Hjemmemappe PREFERENCES_DIRLAST;Sidste besøkte mappe PREFERENCES_DIROTHER;Annen @@ -448,6 +446,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -577,6 +576,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -958,6 +958,9 @@ TP_WBALANCE_TEMPERATURE;Temperatur !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1131,7 +1134,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1160,7 +1164,8 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1175,6 +1180,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1240,6 +1246,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Temperatur !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Polish b/rtdata/languages/Polish index 8b770dfcf..4ca9931d4 100644 --- a/rtdata/languages/Polish +++ b/rtdata/languages/Polish @@ -720,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjęć(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonów(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone są następujące kody formatujące:\n%y - rok\n%m - miesiąc\n%d - dzień\n\nNa przykład według standardu ISO 8601 format daty wygląda następująco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyślny język -PREFERENCES_DEFAULTTHEME;Domyślny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -1465,6 +1463,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1493,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1655,6 +1655,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1708,11 +1711,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1720,6 +1725,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1757,6 +1763,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1774,6 +1781,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrót: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Polish (Latin Characters) b/rtdata/languages/Polish (Latin Characters) index 00b50d4a4..53f4593b8 100644 --- a/rtdata/languages/Polish (Latin Characters) +++ b/rtdata/languages/Polish (Latin Characters) @@ -720,8 +720,6 @@ PREFERENCES_DARKFRAMESHOTS;zdjec(ia) PREFERENCES_DARKFRAMETEMPLATES;szablonow(ny) PREFERENCES_DATEFORMAT;Format daty PREFERENCES_DATEFORMATHINT;Dozwolone sa nastepujace kody formatujace:\n%y - rok\n%m - miesiac\n%d - dzien\n\nNa przyklad wedlug standardu ISO 8601 format daty wyglada nastepujaco:\n%y-%m-%d -PREFERENCES_DEFAULTLANG;Domyslny jezyk -PREFERENCES_DEFAULTTHEME;Domyslny temat PREFERENCES_DIRDARKFRAMES;Katalog z czarnymi klatkami PREFERENCES_DIRHOME;Katalog domowy PREFERENCES_DIRLAST;Ostatnio odwiedzony katalog @@ -1465,6 +1463,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1493,6 +1492,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_299;NR - Chrominance curve !HISTORY_MSG_300;- @@ -1655,6 +1655,9 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1708,11 +1711,13 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1720,6 +1725,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1757,6 +1763,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1774,6 +1781,7 @@ ZOOMPANEL_ZOOMOUT;Oddal\nSkrot: - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_CROP_GTHARMMEANS;Harmonic Means !TP_CROP_GTTRIANGLE1;Golden Triangles 1 !TP_CROP_GTTRIANGLE2;Golden Triangles 2 diff --git a/rtdata/languages/Portugues (Brasil) b/rtdata/languages/Portugues (Brasil) index 93a0f5b9e..3f1416110 100644 --- a/rtdata/languages/Portugues (Brasil) +++ b/rtdata/languages/Portugues (Brasil) @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Tamanho máximo das miniaturas PREFERENCES_CLIPPINGIND;Recortando indicação PREFERENCES_DATEFORMAT;Formato de data PREFERENCES_DATEFORMATHINT;Você pode usar as seguintes formatações:\n%a : ano\n%m : mês\n%d : dia\n\nPor exemplo, o formato de data húngaro é:\n%a/%m/%d -PREFERENCES_DEFAULTLANG;Idioma padrão -PREFERENCES_DEFAULTTHEME;Tema padrão PREFERENCES_DIRHOME;Directory inicial PREFERENCES_DIRLAST;Último directory visitado PREFERENCES_DIROTHER;Outro @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Temperatura !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Temperatura !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Russian b/rtdata/languages/Russian index e04f36fe7..e8e120883 100644 --- a/rtdata/languages/Russian +++ b/rtdata/languages/Russian @@ -651,8 +651,6 @@ PREFERENCES_DARKFRAMESHOTS;снимков PREFERENCES_DARKFRAMETEMPLATES;шаблонов PREFERENCES_DATEFORMAT;Формат даты PREFERENCES_DATEFORMATHINT;Вы можете использовать следующие элементы форматирования:\n%y: год\n%m: месяц\n%d: день\n\nНапример, венгерский формат даты такой:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Язык по умолчанию -PREFERENCES_DEFAULTTHEME;Тема по умолчанию PREFERENCES_DIRDARKFRAMES;Каталог размещения темновых кадров PREFERENCES_DIRHOME;Домашний каталог PREFERENCES_DIRLAST;Последний каталог @@ -1274,6 +1272,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !CURVEEDITOR_AXIS_OUT;O: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1305,6 +1304,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_166;Exposure - Reset !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts @@ -1514,6 +1514,9 @@ ZOOMPANEL_ZOOMOUT;Удалить - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1584,12 +1587,14 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1599,6 +1604,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1637,6 +1643,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1668,7 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_LABEL_VIEWING;Viewing Conditions !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SURROUND;Surround @@ -1691,6 +1698,7 @@ ZOOMPANEL_ZOOMOUT;Удалить - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Serbian (Cyrilic Characters) b/rtdata/languages/Serbian (Cyrilic Characters) index 35b317a09..be9d945e4 100644 --- a/rtdata/languages/Serbian (Cyrilic Characters) +++ b/rtdata/languages/Serbian (Cyrilic Characters) @@ -637,8 +637,6 @@ PREFERENCES_DARKFRAMESHOTS;снимака PREFERENCES_DARKFRAMETEMPLATES;шаблони PREFERENCES_DATEFORMAT;Формат датума PREFERENCES_DATEFORMATHINT;Можете задати следеће формате:\n%y :година\n%m : месец\n%d : дан\n\nУ Србији се највише користи:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Језик програма -PREFERENCES_DEFAULTTHEME;Тема програма PREFERENCES_DIRDARKFRAMES;Директоријум тамног кадра PREFERENCES_DIRHOME;Лични директоријум PREFERENCES_DIRLAST;Последњи директоријум @@ -1296,6 +1294,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1339,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1547,6 +1547,9 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1616,12 +1619,14 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1631,6 +1636,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1669,6 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1689,6 +1696,7 @@ ZOOMPANEL_ZOOMOUT;Умањује приказ слике - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Serbian (Latin Characters) b/rtdata/languages/Serbian (Latin Characters) index 136125eb2..6cfde941a 100644 --- a/rtdata/languages/Serbian (Latin Characters) +++ b/rtdata/languages/Serbian (Latin Characters) @@ -637,8 +637,6 @@ PREFERENCES_DARKFRAMESHOTS;snimaka PREFERENCES_DARKFRAMETEMPLATES;šabloni PREFERENCES_DATEFORMAT;Format datuma PREFERENCES_DATEFORMATHINT;Možete zadati sledeće formate:\n%y :godina\n%m : mesec\n%d : dan\n\nU Srbiji se najviše koristi:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Jezik programa -PREFERENCES_DEFAULTTHEME;Tema programa PREFERENCES_DIRDARKFRAMES;Direktorijum tamnog kadra PREFERENCES_DIRHOME;Lični direktorijum PREFERENCES_DIRLAST;Poslednji direktorijum @@ -1296,6 +1294,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. !DIRBROWSER_FOLDERS;Folders +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1339,6 +1338,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !GENERAL_APPLY;Apply !GENERAL_ASIMAGE;As Image !GENERAL_OPEN;Open +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_252;CbDL - Skin tar/prot !HISTORY_MSG_253;CbDL - Reduce artifacts !HISTORY_MSG_254;CbDL - Skin hue @@ -1547,6 +1547,9 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1616,12 +1619,14 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_CURVEBBOXPOS_BELOW;Below !PREFERENCES_CURVEBBOXPOS_LEFT;Left !PREFERENCES_CURVEBBOXPOS_RIGHT;Right +!PREFERENCES_D50_OLD;5000K !PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 !PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. !PREFERENCES_EXPAUT;Expert !PREFERENCES_FILMSIMULATION;Film Simulation !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT;Same thumbnail height between the Filmstrip and the File Browser !PREFERENCES_FSTRIP_SAME_THUMB_HEIGHT_HINT;Having separate thumbnail size will require more processing time each time you'll switch between the single Editor tab and the File Browser. +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREYSC;Scene Yb luminance (%) !PREFERENCES_GREYSC18;Yb=18 CIE L#50 !PREFERENCES_GREYSCA;Automatic @@ -1631,6 +1636,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_INSPECT_LABEL;Inspect !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size !PREFERENCES_LISS;Auto multi-zone smoothing @@ -1669,6 +1675,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !PREFERENCES_SMA;Small (250x287) !PREFERENCES_STDAUT;Standard !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1689,6 +1696,7 @@ ZOOMPANEL_ZOOMOUT;Umanjuje prikaz slike - !TP_CBDL_BEF;Before Black-and-White !TP_CBDL_METHOD;Process located !TP_CBDL_METHOD_TOOLTIP;Choose whether the Contrast by Detail Levels tool is to be positioned after the Black-and-White tool, which makes it work in L*a*b* space, or before it, which makes it work in RGB space. +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Slovak b/rtdata/languages/Slovak index 326608fb1..747ec5af5 100644 --- a/rtdata/languages/Slovak +++ b/rtdata/languages/Slovak @@ -288,8 +288,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximálna výška zmenšenín PREFERENCES_CLIPPINGIND;Indikácia orezu PREFERENCES_DATEFORMAT;Formát dátumu PREFERENCES_DATEFORMATHINT;Môžete použiť nasledujúce formátovacie reťazce:\n%y : rok\n%m : mesiac\n%d : deň\n\nNapríklad, slovenský formát je:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Predvolený jazyk -PREFERENCES_DEFAULTTHEME;Predvolený vzhľad PREFERENCES_DIRHOME;Domovský adresár PREFERENCES_DIRLAST;Posledný navštívený adresár PREFERENCES_DIROTHER;Iný @@ -530,6 +528,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !CURVEEDITOR_MINMAXCPOINTS;Equalizer !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -650,6 +649,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !GENERAL_NONE;None !GENERAL_OPEN;Open !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -1021,6 +1021,9 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1182,7 +1185,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1210,7 +1214,8 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1225,6 +1230,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1284,6 +1290,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1440,7 +1447,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1465,6 +1472,7 @@ ZOOMPANEL_ZOOMOUT;Oddialiť - !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Suomi b/rtdata/languages/Suomi index 78ea992cb..ed92a41a8 100644 --- a/rtdata/languages/Suomi +++ b/rtdata/languages/Suomi @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Suurin esikatselukuvan korkeus PREFERENCES_CLIPPINGIND;Leikkautuminen PREFERENCES_DATEFORMAT;Päivämäärän muoto PREFERENCES_DATEFORMATHINT;Voit käyttää seuraavia komentoja:\n%y : vuosi\n%m : kuukausi\n%d : päivä\n\nEsimerkiksi, pp.kk.vvvv:\n%d.%m.%y -PREFERENCES_DEFAULTLANG;Oletuskieli -PREFERENCES_DEFAULTTHEME;Oletusteema PREFERENCES_DIRHOME;Kotihakemisto PREFERENCES_DIRLAST;Viimeksi käytetty hakemisto PREFERENCES_DIROTHER;Muu @@ -450,6 +448,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -579,6 +578,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -960,6 +960,9 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1133,7 +1136,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1162,7 +1166,8 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1177,6 +1182,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1242,6 +1248,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1401,7 +1408,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1426,6 +1433,7 @@ TP_WBALANCE_TEMPERATURE;Lämpötila [K] !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/Swedish b/rtdata/languages/Swedish index a2fd6d0d7..7c14dca46 100644 --- a/rtdata/languages/Swedish +++ b/rtdata/languages/Swedish @@ -878,8 +878,6 @@ PREFERENCES_DATEFORMAT;Datumformat PREFERENCES_DATEFORMATHINT;Du kan använda följande format:\n%y: år\n%m: månad\n%d: dag\n\nTill exempel är det svenska datumformatet:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Använd Daubechies D6-wavelets istället för D4 PREFERENCES_DAUB_TOOLTIP;Brusreduceringen och wavelet-verktyget använder en Debauchies moder-wavelet. Om du väljer D6 istället för D4 ökas antalet ortogonala Daubechies-koefficienter och troligtvis ökas också kvaliteten på de småskaliga nivåerna. Det blir ingen skillnad i minnesanvändning eller beräkningstid. -PREFERENCES_DEFAULTLANG;Förvalt språk -PREFERENCES_DEFAULTTHEME;Förvalt tema PREFERENCES_DIRDARKFRAMES;Katalog för svartbilder PREFERENCES_DIRHOME;Hemkatalog PREFERENCES_DIRLAST;Senaste besökta katalog @@ -1888,6 +1886,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !CURVEEDITOR_AXIS_LEFT_TAN;LT: !CURVEEDITOR_AXIS_RIGHT_TAN;RT: !CURVEEDITOR_EDITPOINT_HINT;Enable edition of node in/out values.\n\nRight-click on a node to select it.\nRight-click on empty space to de-select the node. +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -1903,6 +1902,7 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !EXPORT_USE_FAST_PIPELINE_TIP;Use a dedicated processing pipeline for images in Fast Export mode, that trades speed for quality. Resizing of the image is done as early as possible, instead of doing it at the end like in the normal pipeline. The speedup can be significant, but be prepared to see artifacts and a general degradation of output quality. !EXPORT_USE_NORMAL_PIPELINE;Standard (bypass some steps, resize at the end) !FILEBROWSER_RESETDEFAULTPROFILE;Reset to default +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTORY_MSG_257;Color Toning !HISTORY_MSG_288;Flat Field - Clip control !HISTORY_MSG_289;Flat Field - Clip control - Auto @@ -1942,6 +1942,9 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. !IPTCPANEL_COPYRIGHT;Copyright notice @@ -1974,7 +1977,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PARTIALPASTE_RAW_IMAGENUM;Sub-image !PARTIALPASTE_RAW_PIXELSHIFT;PixelShift !PREFERENCES_CMMBPC;Black point compensation +!PREFERENCES_D50_OLD;5000K +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. +!PREFERENCES_LANG;Language !PREFERENCES_LISS;Auto multi-zone smoothing !PREFERENCES_MONINTENT;Default rendering intent !PREFERENCES_MONITOR;Monitor @@ -1987,8 +1993,10 @@ ZOOMPANEL_ZOOMOUT;Förminska.\nKortkommando: - !PREFERENCES_PRTPROFILE;Color profile !PREFERENCES_SERIALIZE_TIFF_READ;Tiff Read Settings !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules +!PREFERENCES_THEME;Theme !PROFILEPANEL_PDYNAMIC;Dynamic !TP_CBDL_METHOD;Process located +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_CURVEEDITOR_CL_TOOLTIP;Chroma opacity as a function of luminance oC=f(L) !TP_COLORTONING_LABEL;Color Toning !TP_COLORTONING_METHOD_TOOLTIP;"L*a*b* blending", "RGB sliders" and "RGB curves" use interpolated color blending.\n"Color balance (Shadows/Midtones/Highlights)" and "Saturation 2 colors" use direct colors.\n\nThe Black-and-White tool can be enabled when using any color toning method, which allows for color toning. diff --git a/rtdata/languages/Turkish b/rtdata/languages/Turkish index fd29ae6be..5d260d926 100644 --- a/rtdata/languages/Turkish +++ b/rtdata/languages/Turkish @@ -244,8 +244,6 @@ PREFERENCES_CACHETHUMBHEIGHT;Maximal Thumbnail Height PREFERENCES_CLIPPINGIND;Kırpma gösterme PREFERENCES_DATEFORMAT;Tarih biçimi PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y : year\n%m : month\n%d : day\n\nFor example, the hungarian date format is:\n%y/%m/%d -PREFERENCES_DEFAULTLANG;Varsayılan dil -PREFERENCES_DEFAULTTHEME;Default theme PREFERENCES_DIRHOME;Kullanıcı dizini PREFERENCES_DIRLAST;Son gidilen dizin PREFERENCES_DIROTHER;Diğer @@ -449,6 +447,7 @@ TP_WBALANCE_TEMPERATURE;Isı !CURVEEDITOR_TOOLTIPCOPY;Copy current curve to clipboard. !CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. !CURVEEDITOR_TYPE;Type: +!DONT_SHOW_AGAIN;Don't show this message again. !DYNPROFILEEDITOR_DELETE;Delete !DYNPROFILEEDITOR_EDIT;Edit !DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -578,6 +577,7 @@ TP_WBALANCE_TEMPERATURE;Isı !GENERAL_OPEN;Open !GENERAL_UNCHANGED;(Unchanged) !GENERAL_WARNING;Warning +!GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. !HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. !HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. !HISTOGRAM_TOOLTIP_FULL;Toggle full (off) or scaled (on) histogram. @@ -959,6 +959,9 @@ TP_WBALANCE_TEMPERATURE;Isı !HISTORY_MSG_473;PS - Use LMMSE !HISTORY_MSG_474;PS - Equalize !HISTORY_MSG_475;PS - Equalize channel +!HISTORY_MSG_476;CAM02 - Temp out +!HISTORY_MSG_477;CAM02 - Green out +!HISTORY_MSG_478;CAM02 - Yb out !HISTORY_NEWSNAPSHOT_TOOLTIP;Shortcut: Alt-s !IPTCPANEL_CATEGORYHINT;Identifies the subject of the image in the opinion of the provider. !IPTCPANEL_CITYHINT;Enter the name of the city pictured in this image. @@ -1132,7 +1135,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID !PREFERENCES_CUSTPROFBUILDPATH;Executable path !PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -!PREFERENCES_D50;5000K +!PREFERENCES_D50;Settings in main menu +!PREFERENCES_D50_OLD;5000K !PREFERENCES_D55;5500K !PREFERENCES_D60;6000K !PREFERENCES_D65;6500K @@ -1161,7 +1165,8 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_GREY05;Yb=05 CIE L#30 !PREFERENCES_GREY10;Yb=10 CIE L#40 !PREFERENCES_GREY15;Yb=15 CIE L#45 -!PREFERENCES_GREY18;Yb=18 CIE L#50 +!PREFERENCES_GREY18;Settings in main menu +!PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 !PREFERENCES_GREY23;Yb=23 CIE L#55 !PREFERENCES_GREY30;Yb=30 CIE L#60 !PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1176,6 +1181,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_INSPECT_MAXBUFFERS_LABEL;Maximum number of cached images !PREFERENCES_INSPECT_MAXBUFFERS_TOOLTIP;Set the maximum number of images stored in cache when hovering over them in the File Browser; systems with little RAM (2GB) should keep this value set to 1 or 2. !PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +!PREFERENCES_LANG;Language !PREFERENCES_LANGAUTODETECT;Use system language !PREFERENCES_LEVAUTDN;Denoising level !PREFERENCES_LEVDN;Cell size @@ -1241,6 +1247,7 @@ TP_WBALANCE_TEMPERATURE;Isı !PREFERENCES_TAB_DYNAMICPROFILE;Dynamic Profile Rules !PREFERENCES_TAB_PERFORMANCE;Performance & Quality !PREFERENCES_TAB_SOUND;Sounds +!PREFERENCES_THEME;Theme !PREFERENCES_TIMAX;High !PREFERENCES_TINB;Number of tiles !PREFERENCES_TISTD;Standard @@ -1400,7 +1407,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_LIGHT;Lightness (J) !TP_COLORAPP_LIGHT_TOOLTIP;Lightness in CIECAM02 differs from L*a*b* and RGB lightness. !TP_COLORAPP_MODEL;WP Model -!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Preferences > Color Management.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Preferences - Color Management. +!TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's white balance is used for the scene, CIECAM02 is set to D50, and the output device's white balance is set in Viewing Conditions.\n\nWB [RT+CAT02] + [output]: RT's white balance settings are used by CAT02 and the output device's white balance is set in Viewing Conditions. !TP_COLORAPP_RSTPRO;Red & skin-tones protection !TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. !TP_COLORAPP_SHARPCIE;--unused-- @@ -1425,6 +1432,7 @@ TP_WBALANCE_TEMPERATURE;Isı !TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. !TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] !TP_COLORAPP_WBRT;WB [RT] + [output] +!TP_COLORAPP_YB;Yb (mean luminance) !TP_COLORTONING_AB;o C/L !TP_COLORTONING_AUTOSAT;Automatic !TP_COLORTONING_BALANCE;Balance diff --git a/rtdata/languages/default b/rtdata/languages/default index 23d12e1be..d2857496c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -36,6 +36,7 @@ CURVEEDITOR_TOOLTIPPASTE;Paste curve from clipboard. CURVEEDITOR_TOOLTIPSAVE;Save current curve. CURVEEDITOR_TYPE;Type: DIRBROWSER_FOLDERS;Folders +DONT_SHOW_AGAIN;Don't show this message again. DYNPROFILEEDITOR_DELETE;Delete DYNPROFILEEDITOR_EDIT;Edit DYNPROFILEEDITOR_EDIT_RULE;Edit Dynamic Profile Rule @@ -234,6 +235,7 @@ GENERAL_PORTRAIT;Portrait GENERAL_SAVE;Save GENERAL_UNCHANGED;(Unchanged) GENERAL_WARNING;Warning +GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. HISTOGRAM_TOOLTIP_B;Show/Hide blue histogram. HISTOGRAM_TOOLTIP_BAR;Show/Hide RGB indicator bar.\nRight-click on image preview to freeze/unfreeze. HISTOGRAM_TOOLTIP_CHRO;Show/Hide chromaticity histogram. @@ -955,8 +957,8 @@ PREFERENCES_CUSTPROFBUILDKEYFORMAT_NAME;Name PREFERENCES_CUSTPROFBUILDKEYFORMAT_TID;TagID PREFERENCES_CUSTPROFBUILDPATH;Executable path PREFERENCES_CUTOVERLAYBRUSH;Crop mask color/transparency -PREFERENCES_D50_OLD;5000K PREFERENCES_D50;Settings in main menu +PREFERENCES_D50_OLD;5000K PREFERENCES_D55;5500K PREFERENCES_D60;6000K PREFERENCES_D65;6500K @@ -968,8 +970,6 @@ PREFERENCES_DATEFORMAT;Date format PREFERENCES_DATEFORMATHINT;You can use the following formatting strings:\n%y - year\n%m - month\n%d - day\n\nFor example, the ISO 8601 standard dictates the date format as follows:\n%y-%m-%d PREFERENCES_DAUB_LABEL;Use Daubechies D6 wavelets instead of D4 PREFERENCES_DAUB_TOOLTIP;The Noise Reduction and Wavelet Levels tools use a Debauchies mother wavelet. If you choose D6 instead of D4 you increase the number of orthogonal Daubechies coefficients and probably increase quality of small-scale levels. There is no memory or processing time difference between the two. -PREFERENCES_DEFAULTLANG;Default Language -PREFERENCES_DEFAULTTHEME;Default Theme PREFERENCES_DIRDARKFRAMES;Dark-frames directory PREFERENCES_DIRHOME;Home directory PREFERENCES_DIRLAST;Last visited directory @@ -1001,8 +1001,8 @@ PREFERENCES_GREY;Output device's Yb luminance (%) PREFERENCES_GREY05;Yb=05 CIE L#30 PREFERENCES_GREY10;Yb=10 CIE L#40 PREFERENCES_GREY15;Yb=15 CIE L#45 -PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 PREFERENCES_GREY18;Settings in main menu +PREFERENCES_GREY18_OLD;Yb=18 CIE L#50 PREFERENCES_GREY23;Yb=23 CIE L#55 PREFERENCES_GREY30;Yb=30 CIE L#60 PREFERENCES_GREY40;Yb=40 CIE L#70 @@ -1024,6 +1024,7 @@ PREFERENCES_INTENT_PERCEPTUAL;Perceptual PREFERENCES_INTENT_RELATIVE;Relative Colorimetric PREFERENCES_INTENT_SATURATION;Saturation PREFERENCES_INTERNALTHUMBIFUNTOUCHED;Show embedded JPEG thumbnail if raw is unedited +PREFERENCES_LANG;Language PREFERENCES_LANGAUTODETECT;Use system language PREFERENCES_LEVAUTDN;Denoising level PREFERENCES_LEVDN;Cell size @@ -1115,6 +1116,7 @@ PREFERENCES_TAB_GENERAL;General PREFERENCES_TAB_IMPROC;Image Processing PREFERENCES_TAB_PERFORMANCE;Performance & Quality PREFERENCES_TAB_SOUND;Sounds +PREFERENCES_THEME;Theme PREFERENCES_TIMAX;High PREFERENCES_TINB;Number of tiles PREFERENCES_TISTD;Standard @@ -2135,5 +2137,3 @@ ZOOMPANEL_ZOOMFITCROPSCREEN;Fit crop to screen\nShortcut: Alt-f ZOOMPANEL_ZOOMFITSCREEN;Fit whole image to screen\nShortcut: f ZOOMPANEL_ZOOMIN;Zoom In\nShortcut: + ZOOMPANEL_ZOOMOUT;Zoom Out\nShortcut: - -GIMP_PLUGIN_INFO;Welcome to the RawTherapee GIMP plugin!\nOnce you are done editing, simply close the main RawTherapee window and the image will be automatically imported in GIMP. -DONT_SHOW_AGAIN;Don't show this message again. diff --git a/rtgui/preferences.cc b/rtgui/preferences.cc index bac6a08d1..700b91110 100644 --- a/rtgui/preferences.cc +++ b/rtgui/preferences.cc @@ -992,7 +992,7 @@ Gtk::Widget* Preferences::getGeneralPanel () // --------------------------------------------- - Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTLANG")) ); + Gtk::Frame* flang = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_LANG")) ); setExpandAlignProperties (flang, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* langGrid = Gtk::manage ( new Gtk::Grid() ); langGrid->set_column_spacing (4); @@ -1027,7 +1027,7 @@ Gtk::Widget* Preferences::getGeneralPanel () // --------------------------------------------- - Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_DEFAULTTHEME")) ); + Gtk::Frame* ftheme = Gtk::manage ( new Gtk::Frame (M ("PREFERENCES_THEME")) ); setExpandAlignProperties (ftheme, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); Gtk::Grid* themeGrid = Gtk::manage ( new Gtk::Grid() ); themeGrid->set_column_spacing (4); From 4429b6f5f5513aad7664699da8bd1612a9dbe7d3 Mon Sep 17 00:00:00 2001 From: Morgan Hardwood Date: Wed, 16 Aug 2017 12:06:53 +0200 Subject: [PATCH 15/17] Added checked-state color for curve buttons to distinguish them from non-checked curve buttons, #4019 --- rtdata/themes/RawTherapee-GTK3-20_.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index c1768f913..f661198af 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -187,24 +187,37 @@ button { min-width: 5px; background-image: linear-gradient(#343434, #2E2E2E, #292929); } + +/* Curve mode buttons and drop-downs */ +button:checked.Left, button:checked.Left + button { + background-image: linear-gradient(to bottom, rgba(100,100,100,.3), rgba(30,30,30,.3)); + background-color: #585858; +} + button.flat { background-image: none; } + button.flat:checked { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + checkbutton > check { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + radiobutton > radio { background-image: linear-gradient(#343434, #2E2E2E, #292929); } + button:hover , button.flat:hover, checkbutton:hover > check, radiobutton:hover > radio { background-image: linear-gradient(shade(#343434,1.3), shade(#2E2E2E,1.3), shade(#292929,1.3)); } + button.popupbutton-arrow { min-width: 18px; } + /* Save, Cancel, OK ... buttons */ .dialog-action-area button { min-height: 24px; From db17c68f1e8eaecaf1ea331b97cc707fb848e009 Mon Sep 17 00:00:00 2001 From: Desmis Date: Thu, 17 Aug 2017 09:38:27 +0200 Subject: [PATCH 16/17] Format with astyle 3. changed files --- rtengine/ciecam02.cc | 630 +++++++++++++++---------------- rtengine/ciecam02.h | 126 +++---- rtengine/improccoordinator.cc | 380 +++++++++---------- rtengine/improccoordinator.h | 6 +- rtengine/improcfun.cc | 97 ++--- rtengine/improcfun.h | 112 +++--- rtengine/procparams.cc | 16 +- rtengine/rtengine.h | 16 +- rtengine/rtthumbnail.cc | 686 +++++++++++++++++----------------- rtengine/simpleprocess.cc | 493 ++++++++++++------------ rtgui/colorappearance.cc | 221 +++++------ rtgui/colorappearance.h | 4 +- rtgui/paramsedited.cc | 8 +- 13 files changed, 1419 insertions(+), 1376 deletions(-) diff --git a/rtengine/ciecam02.cc b/rtengine/ciecam02.cc index 5a2c96395..488093060 100644 --- a/rtengine/ciecam02.cc +++ b/rtengine/ciecam02.cc @@ -39,10 +39,10 @@ namespace rtengine extern const Settings* settings; #endif -void Ciecam02::curvecolor(double satind, double satval, double &sres, double parsat) +void Ciecam02::curvecolor (double satind, double satval, double &sres, double parsat) { if (satind >= 0.0) { - sres = (1. - (satind) / 100.) * satval + (satind) / 100.*(1. - SQR(SQR(1. - min(satval, 1.0)))); + sres = (1. - (satind) / 100.) * satval + (satind) / 100.* (1. - SQR (SQR (1. - min (satval, 1.0)))); if (sres > parsat) { sres = parsat; @@ -58,17 +58,17 @@ void Ciecam02::curvecolor(double satind, double satval, double &sres, double par } } -void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float parsat) +void Ciecam02::curvecolorfloat (float satind, float satval, float &sres, float parsat) { if (satind > 0.f) { if (satval >= 1.f) { // The calculation below goes wrong direction when satval > 1 sres = satval; } else { - sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR(SQR(1.f - min(satval, 1.0f)))); + sres = (1.f - (satind) / 100.f) * satval + (satind) / 100.f * (1.f - SQR (SQR (1.f - min (satval, 1.0f)))); } if (sres > parsat) { - sres = max(parsat, satval); + sres = max (parsat, satval); } } else if (satind < 0.f) { sres = satval * (1.f + (satind) / 100.f); @@ -79,35 +79,35 @@ void Ciecam02::curvecolorfloat(float satind, float satval, float &sres, float pa void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) { - LUTf dcurve(65536, 0); + LUTf dcurve (65536, 0); int skip = 1; // check if brightness curve is needed if (br > 0.00001 || br < -0.00001) { std::vector brightcurvePoints; - brightcurvePoints.resize(9); - brightcurvePoints.at(0) = double(DCT_NURBS); + brightcurvePoints.resize (9); + brightcurvePoints.at (0) = double (DCT_NURBS); - brightcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - brightcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + brightcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range if (br > 0) { - brightcurvePoints.at(3) = 0.1; // toe point - brightcurvePoints.at(4) = 0.1 + br / 150.0; //value at toe point + brightcurvePoints.at (3) = 0.1; // toe point + brightcurvePoints.at (4) = 0.1 + br / 150.0; //value at toe point - brightcurvePoints.at(5) = 0.7; // shoulder point - brightcurvePoints.at(6) = min(1.0, 0.7 + br / 300.0); //value at shoulder point + brightcurvePoints.at (5) = 0.7; // shoulder point + brightcurvePoints.at (6) = min (1.0, 0.7 + br / 300.0); //value at shoulder point } else { - brightcurvePoints.at(3) = 0.1 - br / 150.0; // toe point - brightcurvePoints.at(4) = 0.1; // value at toe point + brightcurvePoints.at (3) = 0.1 - br / 150.0; // toe point + brightcurvePoints.at (4) = 0.1; // value at toe point - brightcurvePoints.at(5) = min(1.0, 0.7 - br / 300.0); // shoulder point - brightcurvePoints.at(6) = 0.7; // value at shoulder point + brightcurvePoints.at (5) = min (1.0, 0.7 - br / 300.0); // shoulder point + brightcurvePoints.at (6) = 0.7; // value at shoulder point } - brightcurvePoints.at(7) = 1.; // white point - brightcurvePoints.at(8) = 1.; // value at white point + brightcurvePoints.at (7) = 1.; // white point + brightcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* brightcurve = new DiagonalCurve (brightcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -121,7 +121,7 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & val = brightcurve->getVal (val); // store result in a temporary array - dcurve[i] = CLIPD(val); + dcurve[i] = CLIPD (val); } delete brightcurve; @@ -149,20 +149,20 @@ void Ciecam02::curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & avg /= sum; std::vector contrastcurvePoints; - contrastcurvePoints.resize(9); - contrastcurvePoints.at(0) = double(DCT_NURBS); + contrastcurvePoints.resize (9); + contrastcurvePoints.at (0) = double (DCT_NURBS); - contrastcurvePoints.at(1) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(2) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (1) = 0.; // black point. Value in [0 ; 1] range + contrastcurvePoints.at (2) = 0.; // black point. Value in [0 ; 1] range - contrastcurvePoints.at(3) = avg - avg * (0.6 - contr / 250.0); // toe point - contrastcurvePoints.at(4) = avg - avg * (0.6 + contr / 250.0); // value at toe point + contrastcurvePoints.at (3) = avg - avg * (0.6 - contr / 250.0); // toe point + contrastcurvePoints.at (4) = avg - avg * (0.6 + contr / 250.0); // value at toe point - contrastcurvePoints.at(5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point - contrastcurvePoints.at(6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point + contrastcurvePoints.at (5) = avg + (1 - avg) * (0.6 - contr / 250.0); // shoulder point + contrastcurvePoints.at (6) = avg + (1 - avg) * (0.6 + contr / 250.0); // value at shoulder point - contrastcurvePoints.at(7) = 1.; // white point - contrastcurvePoints.at(8) = 1.; // value at white point + contrastcurvePoints.at (7) = 1.; // white point + contrastcurvePoints.at (8) = 1.; // value at white point DiagonalCurve* contrastcurve = new DiagonalCurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS / skip); @@ -186,8 +186,8 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf // check if brightness curve is needed if (br > 0.00001f || br < -0.00001f) { - std::vector brightcurvePoints(9); - brightcurvePoints[0] = double(DCT_NURBS); + std::vector brightcurvePoints (9); + brightcurvePoints[0] = double (DCT_NURBS); brightcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range brightcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -197,19 +197,19 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf brightcurvePoints[4] = 0.1f + br / 150.0f; //value at toe point brightcurvePoints[5] = 0.7f; // shoulder point - brightcurvePoints[6] = min(1.0f, 0.7f + br / 300.0f); //value at shoulder point + brightcurvePoints[6] = min (1.0f, 0.7f + br / 300.0f); //value at shoulder point } else { brightcurvePoints[3] = 0.1f - br / 150.0f; // toe point brightcurvePoints[4] = 0.1f; // value at toe point - brightcurvePoints[5] = min(1.0f, 0.7f - br / 300.0f); // shoulder point + brightcurvePoints[5] = min (1.0f, 0.7f - br / 300.0f); // shoulder point brightcurvePoints[6] = 0.7f; // value at shoulder point } brightcurvePoints[7] = 1.f; // white point brightcurvePoints[8] = 1.f; // value at white point - DiagonalCurve brightcurve(brightcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve brightcurve (brightcurvePoints, CURVES_MIN_POLY_POINTS); // Applying brightness curve for (int i = 0; i < 32768; i++) { @@ -221,12 +221,12 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf val = brightcurve.getVal (val); // store result - outCurve[i] = CLIPD(val); + outCurve[i] = CLIPD (val); } } else { // set the identity curve - outCurve.makeIdentity(32767.f); + outCurve.makeIdentity (32767.f); } @@ -242,9 +242,9 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf } avg /= sum; - std::vector contrastcurvePoints(9); + std::vector contrastcurvePoints (9); - contrastcurvePoints[0] = double(DCT_NURBS); + contrastcurvePoints[0] = double (DCT_NURBS); contrastcurvePoints[1] = 0.f; // black point. Value in [0 ; 1] range contrastcurvePoints[2] = 0.f; // black point. Value in [0 ; 1] range @@ -258,11 +258,11 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf contrastcurvePoints[7] = 1.f; // white point contrastcurvePoints[8] = 1.f; // value at white point - DiagonalCurve contrastcurve(contrastcurvePoints, CURVES_MIN_POLY_POINTS); + DiagonalCurve contrastcurve (contrastcurvePoints, CURVES_MIN_POLY_POINTS); // apply contrast enhancement for (int i = 0; i < 32768; i++) { - outCurve[i] = contrastcurve.getVal(outCurve[i]); + outCurve[i] = contrastcurve.getVal (outCurve[i]); } } @@ -295,17 +295,17 @@ void Ciecam02::curveJfloat (float br, float contr, const LUTu & histogram, LUTf * */ -double Ciecam02::d_factor( double f, double la ) +double Ciecam02::d_factor ( double f, double la ) { - return f * (1.0 - ((1.0 / 3.6) * exp((-la - 42.0) / 92.0))); + return f * (1.0 - ((1.0 / 3.6) * exp ((-la - 42.0) / 92.0))); } -float Ciecam02::d_factorfloat( float f, float la ) +float Ciecam02::d_factorfloat ( float f, float la ) { - return f * (1.0f - ((1.0f / 3.6f) * xexpf((-la - 42.0f) / 92.0f))); + return f * (1.0f - ((1.0f / 3.6f) * xexpf ((-la - 42.0f) / 92.0f))); } -double Ciecam02::calculate_fl_from_la_ciecam02( double la ) +double Ciecam02::calculate_fl_from_la_ciecam02 ( double la ) { double la5 = la * 5.0; double k = 1.0 / (la5 + 1.0); @@ -314,10 +314,10 @@ double Ciecam02::calculate_fl_from_la_ciecam02( double la ) k = k * k; k = k * k; - return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt(la5)); + return (0.2 * k * la5) + (0.1 * (1.0 - k) * (1.0 - k) * std::cbrt (la5)); } -float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) +float Ciecam02::calculate_fl_from_la_ciecam02float ( float la ) { float la5 = la * 5.0f; float k = 1.0f / (la5 + 1.0f); @@ -326,66 +326,66 @@ float Ciecam02::calculate_fl_from_la_ciecam02float( float la ) k = k * k; k = k * k; - return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt(la5)); + return (0.2f * k * la5) + (0.1f * (1.0f - k) * (1.0f - k) * std::cbrt (la5)); } -double Ciecam02::achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ) +double Ciecam02::achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ) { double r, g, b; double rc, gc, bc; double rp, gp, bp; double rpa, gpa, bpa; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0 - d)); gc = g * (((y * d) / g) + (1.0 - d)); bc = b * (((y * d) / b) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); return ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; } -float Ciecam02::achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ) +float Ciecam02::achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ) { float r, g, b; float rc, gc, bc; float rp, gp, bp; float rpa, gpa, bpa; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); rc = r * (((y * d) / r) + (1.0f - d)); gc = g * (((y * d) / g) + (1.0f - d)); bc = b * (((y * d) / b) + (1.0f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); return ((2.0f * rpa) + gpa + ((1.0f / 20.0f) * bpa) - 0.305f) * nbb; } -void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y, double z, int gamu ) +void Ciecam02::xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ) { gamu = 1; @@ -403,7 +403,7 @@ void Ciecam02::xyz_to_cat02( double &r, double &g, double &b, double x, double y } } -void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y, float z, int gamu ) +void Ciecam02::xyz_to_cat02float ( float &r, float &g, float &b, float x, float y, float z, int gamu ) { gamu = 1; @@ -421,16 +421,16 @@ void Ciecam02::xyz_to_cat02float( float &r, float &g, float &b, float x, float y } } #ifdef __SSE2__ -void Ciecam02::xyz_to_cat02float( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) +void Ciecam02::xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ) { //gamut correction M.H.Brill S.Susstrunk - r = ( F2V(1.007245f) * x) + (F2V(0.011136f) * y) - (F2V(0.018381f) * z);//Changjun Li - g = (F2V(-0.318061f) * x) + (F2V(1.314589f) * y) + (F2V(0.003471f) * z); + r = ( F2V (1.007245f) * x) + (F2V (0.011136f) * y) - (F2V (0.018381f) * z); //Changjun Li + g = (F2V (-0.318061f) * x) + (F2V (1.314589f) * y) + (F2V (0.003471f) * z); b = z; } #endif -void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ) { gamu = 1; @@ -448,7 +448,7 @@ void Ciecam02::cat02_to_xyz( double &x, double &y, double &z, double r, double g } } -void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ) { gamu = 1; @@ -466,16 +466,16 @@ void Ciecam02::cat02_to_xyzfloat( float &x, float &y, float &z, float r, float g } } #ifdef __SSE2__ -void Ciecam02::cat02_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { //gamut correction M.H.Brill S.Susstrunk - x = ( F2V(0.99015849f) * r) - (F2V(0.00838772f) * g) + (F2V(0.018229217f) * b); //Changjun Li - y = ( F2V(0.239565979f) * r) + (F2V(0.758664642f) * g) + (F2V(0.001770137f) * b); + x = ( F2V (0.99015849f) * r) - (F2V (0.00838772f) * g) + (F2V (0.018229217f) * b); //Changjun Li + y = ( F2V (0.239565979f) * r) + (F2V (0.758664642f) * g) + (F2V (0.001770137f) * b); z = b; } #endif -void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, double b ) +void Ciecam02::hpe_to_xyz ( double &x, double &y, double &z, double r, double g, double b ) { x = (1.910197 * r) - (1.112124 * g) + (0.201908 * b); y = (0.370950 * r) + (0.629054 * g) - (0.000008 * b); @@ -483,22 +483,22 @@ void Ciecam02::hpe_to_xyz( double &x, double &y, double &z, double r, double g, } -void Ciecam02::hpe_to_xyzfloat( float &x, float &y, float &z, float r, float g, float b ) +void Ciecam02::hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ) { x = (1.910197f * r) - (1.112124f * g) + (0.201908f * b); y = (0.370950f * r) + (0.629054f * g) - (0.000008f * b); z = b; } #ifdef __SSE2__ -void Ciecam02::hpe_to_xyzfloat( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) +void Ciecam02::hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ) { - x = (F2V(1.910197f) * r) - (F2V(1.112124f) * g) + (F2V(0.201908f) * b); - y = (F2V(0.370950f) * r) + (F2V(0.629054f) * g) - (F2V(0.000008f) * b); + x = (F2V (1.910197f) * r) - (F2V (1.112124f) * g) + (F2V (0.201908f) * b); + y = (F2V (0.370950f) * r) + (F2V (0.629054f) * g) - (F2V (0.000008f) * b); z = b; } #endif -void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) +void Ciecam02::cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ) { gamu = 1; @@ -513,7 +513,7 @@ void Ciecam02::cat02_to_hpe( double &rh, double &gh, double &bh, double r, doubl } } -void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) +void Ciecam02::cat02_to_hpefloat ( float &rh, float &gh, float &bh, float r, float g, float b, int gamu ) { gamu = 1; @@ -529,16 +529,16 @@ void Ciecam02::cat02_to_hpefloat( float &rh, float &gh, float &bh, float r, floa } #ifdef __SSE2__ -void Ciecam02::cat02_to_hpefloat( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) +void Ciecam02::cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b) { //Changjun Li - rh = ( F2V(0.550930835f) * r) + (F2V(0.519435987f) * g) - ( F2V(0.070356303f) * b); - gh = ( F2V(0.055954056f) * r) + (F2V(0.89973132f) * g) + (F2V(0.044315524f) * b); + rh = ( F2V (0.550930835f) * r) + (F2V (0.519435987f) * g) - ( F2V (0.070356303f) * b); + gh = ( F2V (0.055954056f) * r) + (F2V (0.89973132f) * g) + (F2V (0.044315524f) * b); bh = b; } #endif -void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) +void Ciecam02::Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ) { double x = (A / nbb) + 0.305; @@ -550,7 +550,7 @@ void Ciecam02::Aab_to_rgb( double &r, double &g, double &b, double A, double aa, b = (0.32787 * x) - (0.15681 * aa) - (4.49038 * bb); } -void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) +void Ciecam02::Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ) { float x = (A / nbb) + 0.305f; @@ -562,28 +562,28 @@ void Ciecam02::Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, b = (0.32787f * x) - (0.15681f * aa) - (4.49038f * bb); } #ifdef __SSE2__ -void Ciecam02::Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) +void Ciecam02::Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ) { - vfloat c1 = F2V(0.32787f) * ((A / nbb) + F2V(0.305f)); + vfloat c1 = F2V (0.32787f) * ((A / nbb) + F2V (0.305f)); /* c1 c2 c3 */ - r = c1 + (F2V(0.32145f) * aa) + (F2V(0.20527f) * bb); + r = c1 + (F2V (0.32145f) * aa) + (F2V (0.20527f) * bb); /* c1 c4 c5 */ - g = c1 - (F2V(0.63507f) * aa) - (F2V(0.18603f) * bb); + g = c1 - (F2V (0.63507f) * aa) - (F2V (0.18603f) * bb); /* c1 c6 c7 */ - b = c1 - (F2V(0.15681f) * aa) - (F2V(4.49038f) * bb); + b = c1 - (F2V (0.15681f) * aa) - (F2V (4.49038f) * bb); } #endif -void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ) +void Ciecam02::calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ) { double hrad = (h * rtengine::RT_PI) / 180.0; - double sinh = sin( hrad ); - double cosh = cos( hrad ); + double sinh = sin ( hrad ); + double cosh = cos ( hrad ); double x = (a / nbb) + 0.305; double p3 = 21.0 / 20.0; - if ( fabs( sinh ) >= fabs( cosh ) ) { + if ( fabs ( sinh ) >= fabs ( cosh ) ) { bb = ((0.32787 * x) * (2.0 + p3)) / ((e / (t * sinh)) - // ((0.32145 - 0.63507 - (p3 * 0.15681)) * (cosh / sinh)) - @@ -603,24 +603,24 @@ void Ciecam02::calculate_ab( double &aa, double &bb, double h, double e, double bb = (aa * sinh) / cosh; } } -void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ) +void Ciecam02::calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ) { - float2 sincosval = xsincosf((h * rtengine::RT_PI) / 180.0f); + float2 sincosval = xsincosf ((h * rtengine::RT_PI) / 180.0f); float sinh = sincosval.x; float cosh = sincosval.y; float x = (a / nbb) + 0.305f; float p3 = 1.05f; - bool swapValues = fabs( sinh ) > fabs( cosh ); + bool swapValues = fabs ( sinh ) > fabs ( cosh ); if (swapValues) { - std::swap(sinh, cosh); + std::swap (sinh, cosh); } float c1 = 1.f; float c2 = sinh / cosh; if (swapValues) { - std::swap(c1, c2); + std::swap (c1, c2); } float div = ((e / (t * cosh)) - (-0.31362f - (p3 * 0.15681f)) * c1 - ((0.01924f - (p3 * 4.49038f)) * (c2))); @@ -629,7 +629,7 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - if (signf(div) != signf(cosh) || fabsf(div) <= fabsf(cosh) * 2.f) { + if (signf (div) != signf (cosh) || fabsf (div) <= fabsf (cosh) * 2.f) { div = cosh * 2.f; } @@ -637,146 +637,146 @@ void Ciecam02::calculate_abfloat( float &aa, float &bb, float h, float e, float bb = (aa * sinh) / cosh; if (swapValues) { - std::swap(aa, bb); + std::swap (aa, bb); } } #ifdef __SSE2__ -void Ciecam02::calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) +void Ciecam02::calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ) { - vfloat2 sincosval = xsincosf((h * F2V(rtengine::RT_PI)) / F2V(180.0f)); + vfloat2 sincosval = xsincosf ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)); vfloat sinh = sincosval.x; vfloat cosh = sincosval.y; - vfloat x = (a / nbb) + F2V(0.305f); - vfloat p3 = F2V(1.05f); - vmask swapMask = vmaskf_gt(vabsf(sinh), vabsf(cosh)); - vswap(swapMask, sinh, cosh); - vfloat c1 = F2V(1.f); + vfloat x = (a / nbb) + F2V (0.305f); + vfloat p3 = F2V (1.05f); + vmask swapMask = vmaskf_gt (vabsf (sinh), vabsf (cosh)); + vswap (swapMask, sinh, cosh); + vfloat c1 = F2V (1.f); vfloat c2 = sinh / cosh; - vswap(swapMask, c1, c2); + vswap (swapMask, c1, c2); - vfloat div = ((e / (t * cosh)) - (F2V(-0.31362f) - (p3 * F2V(0.15681f))) * c1 - ((F2V(0.01924f) - (p3 * F2V(4.49038f))) * (c2))); + vfloat div = ((e / (t * cosh)) - (F2V (-0.31362f) - (p3 * F2V (0.15681f))) * c1 - ((F2V (0.01924f) - (p3 * F2V (4.49038f))) * (c2))); // for large values of t the above calculation can change its sign which results in a hue shift of 180 degree // so we have to check the sign to avoid this shift. // Additionally it seems useful to limit the minimum value of div // I limited it, but I'm sure the actual limit is not the best one - vmask limitMask = vmaskf_neq(vsignf(div), vsignf(cosh)); - limitMask = vorm(limitMask, vmaskf_le(vabsf(div), vabsf(cosh) * F2V(2.f))); - div = vself(limitMask, cosh * F2V(2.f), div); + vmask limitMask = vmaskf_neq (vsignf (div), vsignf (cosh)); + limitMask = vorm (limitMask, vmaskf_le (vabsf (div), vabsf (cosh) * F2V (2.f))); + div = vself (limitMask, cosh * F2V (2.f), div); - aa = ((F2V(0.32787f) * x) * (F2V(2.0f) + p3)) / div; + aa = ((F2V (0.32787f) * x) * (F2V (2.0f) + p3)) / div; bb = (aa * sinh) / cosh; - vswap(swapMask, aa, bb); + vswap (swapMask, aa, bb); } #endif -void Ciecam02::initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) +void Ciecam02::initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factor( f, la ); + d = d_factor ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow( fl, 0.25 ); - pfl = pow( fl, 0.25 ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0 / c ) * ( aw + 4.0 ) * pow ( fl, 0.25 ); + pfl = pow ( fl, 0.25 ); #ifdef _DEBUG if (settings->verbose) { - printf("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); + printf ("Source double d=%f aw=%f fl=%f wh=%f\n", d, aw, fl, wh); } #endif } -void Ciecam02::initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) +void Ciecam02::initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c) { n = yb / yw; if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); - wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F( fl, 0.25f ); - pfl = pow_F( fl, 0.25f ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); + wh = ( 4.0f / c ) * ( aw + 4.0f ) * pow_F ( fl, 0.25f ); + pfl = pow_F ( fl, 0.25f ); #ifdef _DEBUG if (settings->verbose) { - printf("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); + printf ("Source float d=%f aw=%f fl=%f wh=%f c=%f awc=%f\n", d, aw, fl, wh, c, (4.f / c) * (aw + 4.f)); } #endif } -void Ciecam02::initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl) +void Ciecam02::initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl) { n = yb / yw; - + if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - + // d = d_factor( f, la ); - fl = calculate_fl_from_la_ciecam02( la ); - nbb = ncb = 0.725 * pow( 1.0 / n, 0.2 ); - cz = 1.48 + sqrt( n ); - aw = achromatic_response_to_white( xw, yw, zw, d, fl, nbb, gamu ); + fl = calculate_fl_from_la_ciecam02 ( la ); + nbb = ncb = 0.725 * pow ( 1.0 / n, 0.2 ); + cz = 1.48 + sqrt ( n ); + aw = achromatic_response_to_white ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing double d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl) +void Ciecam02::initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl) { n = yb / yw; - + if (pilotd == 2.0) { - d = d_factorfloat( f, la ); + d = d_factorfloat ( f, la ); } else { d = pilotd; } - - // d = d_factorfloat( f, la ); - fl = calculate_fl_from_la_ciecam02float( la ); - nbb = ncb = 0.725f * pow_F( 1.0f / n, 0.2f ); - cz = 1.48f + sqrt( n ); - aw = achromatic_response_to_whitefloat( xw, yw, zw, d, fl, nbb, gamu ); + +// d = d_factorfloat( f, la ); + fl = calculate_fl_from_la_ciecam02float ( la ); + nbb = ncb = 0.725f * pow_F ( 1.0f / n, 0.2f ); + cz = 1.48f + sqrt ( n ); + aw = achromatic_response_to_whitefloat ( xw, yw, zw, d, fl, nbb, gamu ); #ifdef _DEBUG if (settings->verbose) { - printf("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); + printf ("Viewing float d=%f aw=%f fl=%f n=%f\n", d, aw, fl, n); } #endif } -void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, double xw, double yw, double zw, - double yb, double la, double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d) +void Ciecam02::xyz2jchqms_ciecam02 ( double &J, double &C, double &h, double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, double xw, double yw, double zw, + double yb, double la, double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d) { double r, g, b; double rw, gw, bw; @@ -787,28 +787,28 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, double e, t; double myh; gamu = 1; - xyz_to_cat02( r, g, b, x, y, z, gamu ); - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02 ( r, g, b, x, y, z, gamu ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.0 - d)); gc = g * (((yw * d) / gw) + (1.0 - d)); bc = b * (((yw * d) / bw) + (1.0 - d)); - cat02_to_hpe( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpe ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0); - gp = MAXR(gp, 0.0); - bp = MAXR(bp, 0.0); + rp = MAXR (rp, 0.0); + gp = MAXR (gp, 0.0); + bp = MAXR (bp, 0.0); } - rpa = nonlinear_adaptation( rp, fl ); - gpa = nonlinear_adaptation( gp, fl ); - bpa = nonlinear_adaptation( bp, fl ); + rpa = nonlinear_adaptation ( rp, fl ); + gpa = nonlinear_adaptation ( gp, fl ); + bpa = nonlinear_adaptation ( bp, fl ); ca = rpa - ((12.0 * gpa) / 11.0) + (bpa / 11.0); cb = (1.0 / 9.0) * (rpa + gpa - (2.0 * bpa)); - myh = (180.0 / rtengine::RT_PI) * atan2( cb, ca ); + myh = (180.0 / rtengine::RT_PI) * atan2 ( cb, ca ); if ( myh < 0.0 ) { myh += 360.0; @@ -840,24 +840,24 @@ void Ciecam02::xyz2jchqms_ciecam02( double &J, double &C, double &h, double &Q, a = ((2.0 * rpa) + gpa + ((1.0 / 20.0) * bpa) - 0.305) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0); //gamut correction M.H.Brill S.Susstrunk } - J = 100.0 * pow( a / aw, c * cz ); + J = 100.0 * pow ( a / aw, c * cz ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((myh * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); - t = (e * sqrt( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((myh * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + t = (e * sqrt ( (ca * ca) + (cb * cb) )) / (rpa + gpa + ((21.0 / 20.0) * bpa)); - C = pow( t, 0.9 ) * sqrt( J / 100.0 ) - * pow( 1.64 - pow( 0.29, n ), 0.73 ); + C = pow ( t, 0.9 ) * sqrt ( J / 100.0 ) + * pow ( 1.64 - pow ( 0.29, n ), 0.73 ); - Q = wh * sqrt( J / 100.0 ); + Q = wh * sqrt ( J / 100.0 ); M = C * pfl; - s = 100.0 * sqrt( M / Q ); + s = 100.0 * sqrt ( M / Q ); h = myh; } -void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, +void Ciecam02::xyz2jchqms_ciecam02float ( float &J, float &C, float &h, float &Q, float &M, float &s, float aw, float fl, float wh, float x, float y, float z, float xw, float yw, float zw, float c, float nc, int gamu, float pow1, float nbb, float ncb, float pfl, float cz, float d) @@ -871,28 +871,28 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, float e, t; float myh; gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { myh += (2.f * rtengine::RT_PI); @@ -901,25 +901,25 @@ void Ciecam02::xyz2jchqms_ciecam02float( float &J, float &C, float &h, float &Q, a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; Q = wh * J; J *= J * 100.0f; M = C * pfl; Q = (Q == 0.f ? 0.0001f : Q); // avoid division by zero - s = 100.0f * sqrtf( M / Q ); + s = 100.0f * sqrtf ( M / Q ); h = (myh * 180.f) / (float)rtengine::RT_PI; } #ifdef __SSE2__ -void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, +void Ciecam02::xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, vfloat x, vfloat y, vfloat z, vfloat xw, vfloat yw, vfloat zw, vfloat c, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d) @@ -932,53 +932,53 @@ void Ciecam02::xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, vfloat vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( r, g, b, x, y, z); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - vfloat onev = F2V(1.f); + xyz_to_cat02float ( r, g, b, x, y, z); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + vfloat onev = F2V (1.f); rc = r * (((yw * d) / rw) + (onev - d)); gc = g * (((yw * d) / gw) + (onev - d)); bc = b * (((yw * d) / bw) + (onev - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc); //gamut correction M.H.Brill S.Susstrunk - rp = _mm_max_ps(rp, ZEROV); - gp = _mm_max_ps(gp, ZEROV); - bp = _mm_max_ps(bp, ZEROV); - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rp = _mm_max_ps (rp, ZEROV); + gp = _mm_max_ps (gp, ZEROV); + bp = _mm_max_ps (bp, ZEROV); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); - ca = rpa - ((F2V(12.0f) * gpa) - bpa) / F2V(11.0f); - cb = F2V(0.11111111f) * (rpa + gpa - (bpa + bpa)); + ca = rpa - ((F2V (12.0f) * gpa) - bpa) / F2V (11.0f); + cb = F2V (0.11111111f) * (rpa + gpa - (bpa + bpa)); - vfloat myh = xatan2f( cb, ca ); - vfloat temp = F2V(rtengine::RT_PI); + vfloat myh = xatan2f ( cb, ca ); + vfloat temp = F2V (rtengine::RT_PI); temp += temp; temp += myh; - myh = vself(vmaskf_lt(myh, ZEROV), temp, myh); + myh = vself (vmaskf_lt (myh, ZEROV), temp, myh); - a = ((rpa + rpa) + gpa + (F2V(0.05f) * bpa) - F2V(0.305f)) * nbb; - a = _mm_max_ps(a, ZEROV); //gamut correction M.H.Brill S.Susstrunk + a = ((rpa + rpa) + gpa + (F2V (0.05f) * bpa) - F2V (0.305f)) * nbb; + a = _mm_max_ps (a, ZEROV); //gamut correction M.H.Brill S.Susstrunk - J = pow_F( a / aw, c * cz * F2V(0.5f)); + J = pow_F ( a / aw, c * cz * F2V (0.5f)); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( myh + F2V(2.0f) ) + F2V(3.8f)); - t = (e * _mm_sqrt_ps( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V(1.05f) * bpa)); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( myh + F2V (2.0f) ) + F2V (3.8f)); + t = (e * _mm_sqrt_ps ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (F2V (1.05f) * bpa)); - C = pow_F( t, F2V(0.9f) ) * J * pow1; + C = pow_F ( t, F2V (0.9f) ) * J * pow1; Q = wh * J; - J *= J * F2V(100.0f); + J *= J * F2V (100.0f); M = C * pfl; - Q = _mm_max_ps(Q, F2V(0.0001f)); // avoid division by zero - s = F2V(100.0f) * _mm_sqrt_ps( M / Q ); - h = (myh * F2V(180.f)) / F2V(rtengine::RT_PI); + Q = _mm_max_ps (Q, F2V (0.0001f)); // avoid division by zero + s = F2V (100.0f) * _mm_sqrt_ps ( M / Q ); + h = (myh * F2V (180.f)) / F2V (rtengine::RT_PI); } #endif -void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, float fl, - float x, float y, float z, float xw, float yw, float zw, - float c, float nc, float pow1, float nbb, float ncb, float cz, float d) +void Ciecam02::xyz2jch_ciecam02float ( float &J, float &C, float &h, float aw, float fl, + float x, float y, float z, float xw, float yw, float zw, + float c, float nc, float pow1, float nbb, float ncb, float cz, float d) { float r, g, b; @@ -990,28 +990,28 @@ void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, fl float e, t; float myh; int gamu = 1; - xyz_to_cat02float( r, g, b, x, y, z, gamu ); - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); + xyz_to_cat02float ( r, g, b, x, y, z, gamu ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); rc = r * (((yw * d) / rw) + (1.f - d)); gc = g * (((yw * d) / gw) + (1.f - d)); bc = b * (((yw * d) / bw) + (1.f - d)); - cat02_to_hpefloat( rp, gp, bp, rc, gc, bc, gamu ); + cat02_to_hpefloat ( rp, gp, bp, rc, gc, bc, gamu ); if (gamu == 1) { //gamut correction M.H.Brill S.Susstrunk - rp = MAXR(rp, 0.0f); - gp = MAXR(gp, 0.0f); - bp = MAXR(bp, 0.0f); + rp = MAXR (rp, 0.0f); + gp = MAXR (gp, 0.0f); + bp = MAXR (bp, 0.0f); } - rpa = nonlinear_adaptationfloat( rp, fl ); - gpa = nonlinear_adaptationfloat( gp, fl ); - bpa = nonlinear_adaptationfloat( bp, fl ); + rpa = nonlinear_adaptationfloat ( rp, fl ); + gpa = nonlinear_adaptationfloat ( gp, fl ); + bpa = nonlinear_adaptationfloat ( bp, fl ); ca = rpa - ((12.0f * gpa) - bpa) / 11.0f; cb = (0.11111111f) * (rpa + gpa - (2.0f * bpa)); - myh = xatan2f( cb, ca ); + myh = xatan2f ( cb, ca ); if ( myh < 0.0f ) { myh += (2.f * rtengine::RT_PI); @@ -1020,24 +1020,24 @@ void Ciecam02::xyz2jch_ciecam02float( float &J, float &C, float &h, float aw, fl a = ((2.0f * rpa) + gpa + (0.05f * bpa) - 0.305f) * nbb; if (gamu == 1) { - a = MAXR(a, 0.0f); //gamut correction M.H.Brill S.Susstrunk + a = MAXR (a, 0.0f); //gamut correction M.H.Brill S.Susstrunk } - J = pow_F( a / aw, c * cz * 0.5f); + J = pow_F ( a / aw, c * cz * 0.5f); - e = ((961.53846f) * nc * ncb) * (xcosf( myh + 2.0f ) + 3.8f); - t = (e * sqrtf( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); + e = ((961.53846f) * nc * ncb) * (xcosf ( myh + 2.0f ) + 3.8f); + t = (e * sqrtf ( (ca * ca) + (cb * cb) )) / (rpa + gpa + (1.05f * bpa)); - C = pow_F( t, 0.9f ) * J * pow1; + C = pow_F ( t, 0.9f ) * J * pow1; J *= J * 100.0f; h = (myh * 180.f) / (float)rtengine::RT_PI; } -void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, double C, double h, - double xw, double yw, double zw, double yb, double la, - double f, double c, double nc , int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) +void Ciecam02::jch2xyz_ciecam02 ( double &x, double &y, double &z, double J, double C, double h, + double xw, double yw, double zw, double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw ) { double r, g, b; double rc, gc, bc; @@ -1047,31 +1047,31 @@ void Ciecam02::jch2xyz_ciecam02( double &x, double &y, double &z, double J, doub double a, ca, cb; double e, t; gamu = 1; - xyz_to_cat02( rw, gw, bw, xw, yw, zw, gamu ); - e = ((12500.0 / 13.0) * nc * ncb) * (cos( ((h * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); - a = pow( J / 100.0, 1.0 / (c * cz) ) * aw; - t = pow( C / (sqrt( J / 100) * pow( 1.64 - pow( 0.29, n ), 0.73 )), 10.0 / 9.0 ); + xyz_to_cat02 ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((12500.0 / 13.0) * nc * ncb) * (cos ( ((h * rtengine::RT_PI) / 180.0) + 2.0 ) + 3.8); + a = pow ( J / 100.0, 1.0 / (c * cz) ) * aw; + t = pow ( C / (sqrt ( J / 100) * pow ( 1.64 - pow ( 0.29, n ), 0.73 )), 10.0 / 9.0 ); - calculate_ab( ca, cb, h, e, t, nbb, a ); - Aab_to_rgb( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_ab ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgb ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptation( rpa, fl ); - gp = inverse_nonlinear_adaptation( gpa, fl ); - bp = inverse_nonlinear_adaptation( bpa, fl ); + rp = inverse_nonlinear_adaptation ( rpa, fl ); + gp = inverse_nonlinear_adaptation ( gpa, fl ); + bp = inverse_nonlinear_adaptation ( bpa, fl ); - hpe_to_xyz( x, y, z, rp, gp, bp ); - xyz_to_cat02( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyz ( x, y, z, rp, gp, bp ); + xyz_to_cat02 ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0 - d)); g = gc / (((yw * d) / gw) + (1.0 - d)); b = bc / (((yw * d) / bw) + (1.0 - d)); - cat02_to_xyz( x, y, z, r, g, b, gamu ); + cat02_to_xyz ( x, y, z, r, g, b, gamu ); } -void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc , int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) +void Ciecam02::jch2xyz_ciecam02float ( float &x, float &y, float &z, float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float pow1, float nbb, float ncb, float fl, float cz, float d, float aw) { float r, g, b; float rc, gc, bc; @@ -1081,32 +1081,32 @@ void Ciecam02::jch2xyz_ciecam02float( float &x, float &y, float &z, float J, flo float a, ca, cb; float e, t; gamu = 1; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw, gamu ); - e = ((961.53846f) * nc * ncb) * (xcosf( ((h * rtengine::RT_PI) / 180.0f) + 2.0f ) + 3.8f); - a = pow_F( J / 100.0f, 1.0f / (c * cz) ) * aw; - t = pow_F( 10.f * C / (sqrtf( J ) * pow1), 1.1111111f ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw, gamu ); + e = ((961.53846f) * nc * ncb) * (xcosf ( ((h * rtengine::RT_PI) / 180.0f) + 2.0f ) + 3.8f); + a = pow_F ( J / 100.0f, 1.0f / (c * cz) ) * aw; + t = pow_F ( 10.f * C / (sqrtf ( J ) * pow1), 1.1111111f ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z, gamu ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z, gamu ); r = rc / (((yw * d) / rw) + (1.0f - d)); g = gc / (((yw * d) / gw) + (1.0f - d)); b = bc / (((yw * d) / bw) + (1.0f - d)); - cat02_to_xyzfloat( x, y, z, r, g, b, gamu ); + cat02_to_xyzfloat ( x, y, z, r, g, b, gamu ); } #ifdef __SSE2__ -void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) +void Ciecam02::jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat pow1, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz) { vfloat r, g, b; vfloat rc, gc, bc; @@ -1115,70 +1115,70 @@ void Ciecam02::jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, vfloat J, vfloat rw, gw, bw; vfloat a, ca, cb; vfloat e, t; - xyz_to_cat02float( rw, gw, bw, xw, yw, zw); - e = ((F2V(961.53846f)) * nc * ncb) * (xcosf( ((h * F2V(rtengine::RT_PI)) / F2V(180.0f)) + F2V(2.0f) ) + F2V(3.8f)); - a = pow_F( J / F2V(100.0f), reccmcz ) * aw; - t = pow_F( F2V(10.f) * C / (_mm_sqrt_ps( J ) * pow1), F2V(1.1111111f) ); + xyz_to_cat02float ( rw, gw, bw, xw, yw, zw); + e = ((F2V (961.53846f)) * nc * ncb) * (xcosf ( ((h * F2V (rtengine::RT_PI)) / F2V (180.0f)) + F2V (2.0f) ) + F2V (3.8f)); + a = pow_F ( J / F2V (100.0f), reccmcz ) * aw; + t = pow_F ( F2V (10.f) * C / (_mm_sqrt_ps ( J ) * pow1), F2V (1.1111111f) ); - calculate_abfloat( ca, cb, h, e, t, nbb, a ); - Aab_to_rgbfloat( rpa, gpa, bpa, a, ca, cb, nbb ); + calculate_abfloat ( ca, cb, h, e, t, nbb, a ); + Aab_to_rgbfloat ( rpa, gpa, bpa, a, ca, cb, nbb ); - rp = inverse_nonlinear_adaptationfloat( rpa, fl ); - gp = inverse_nonlinear_adaptationfloat( gpa, fl ); - bp = inverse_nonlinear_adaptationfloat( bpa, fl ); + rp = inverse_nonlinear_adaptationfloat ( rpa, fl ); + gp = inverse_nonlinear_adaptationfloat ( gpa, fl ); + bp = inverse_nonlinear_adaptationfloat ( bpa, fl ); - hpe_to_xyzfloat( x, y, z, rp, gp, bp ); - xyz_to_cat02float( rc, gc, bc, x, y, z ); + hpe_to_xyzfloat ( x, y, z, rp, gp, bp ); + xyz_to_cat02float ( rc, gc, bc, x, y, z ); - r = rc / (((yw * d) / rw) + (F2V(1.0f) - d)); - g = gc / (((yw * d) / gw) + (F2V(1.0f) - d)); - b = bc / (((yw * d) / bw) + (F2V(1.0f) - d)); + r = rc / (((yw * d) / rw) + (F2V (1.0f) - d)); + g = gc / (((yw * d) / gw) + (F2V (1.0f) - d)); + b = bc / (((yw * d) / bw) + (F2V (1.0f) - d)); - cat02_to_xyzfloat( x, y, z, r, g, b ); + cat02_to_xyzfloat ( x, y, z, r, g, b ); } #endif -double Ciecam02::nonlinear_adaptation( double c, double fl ) +double Ciecam02::nonlinear_adaptation ( double c, double fl ) { double p; if (c < 0.0) { - p = pow( (-1.0 * fl * c) / 100.0, 0.42 ); + p = pow ( (-1.0 * fl * c) / 100.0, 0.42 ); return ((-1.0 * 400.0 * p) / (27.13 + p)) + 0.1; } else { - p = pow( (fl * c) / 100.0, 0.42 ); + p = pow ( (fl * c) / 100.0, 0.42 ); return ((400.0 * p) / (27.13 + p)) + 0.1; } } -float Ciecam02::nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::nonlinear_adaptationfloat ( float c, float fl ) { float p; if (c < 0.0f) { - p = pow_F( (-1.0f * fl * c) / 100.0f, 0.42f ); + p = pow_F ( (-1.0f * fl * c) / 100.0f, 0.42f ); return ((-1.0f * 400.0f * p) / (27.13f + p)) + 0.1f; } else { - p = pow_F( (fl * c) / 100.0f, 0.42f ); + p = pow_F ( (fl * c) / 100.0f, 0.42f ); return ((400.0f * p) / (27.13f + p)) + 0.1f; } } #ifdef __SSE2__ -vfloat Ciecam02::nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - vfloat c100 = F2V(100.f); - vfloat czd42 = F2V(0.42f); - vfloat c400 = vmulsignf(F2V(400.f), c); - fl = vmulsignf(fl, c); - vfloat p = pow_F( (fl * c) / c100, czd42 ); - vfloat c27d13 = F2V(27.13); - vfloat czd1 = F2V(0.1f); + vfloat c100 = F2V (100.f); + vfloat czd42 = F2V (0.42f); + vfloat c400 = vmulsignf (F2V (400.f), c); + fl = vmulsignf (fl, c); + vfloat p = pow_F ( (fl * c) / c100, czd42 ); + vfloat c27d13 = F2V (27.13); + vfloat czd1 = F2V (0.1f); return ((c400 * p) / (c27d13 + p)) + czd1; } #endif -double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) +double Ciecam02::inverse_nonlinear_adaptation ( double c, double fl ) { int c1; @@ -1188,10 +1188,10 @@ double Ciecam02::inverse_nonlinear_adaptation( double c, double fl ) c1 = 1; } - return c1 * (100.0 / fl) * pow( (27.13 * fabs( c - 0.1 )) / (400.0 - fabs( c - 0.1 )), 1.0 / 0.42 ); + return c1 * (100.0 / fl) * pow ( (27.13 * fabs ( c - 0.1 )) / (400.0 - fabs ( c - 0.1 )), 1.0 / 0.42 ); } -float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) +float Ciecam02::inverse_nonlinear_adaptationfloat ( float c, float fl ) { c -= 0.1f; @@ -1205,17 +1205,17 @@ float Ciecam02::inverse_nonlinear_adaptationfloat( float c, float fl ) c = 399.99f; } - return (100.0f / fl) * pow_F( (27.13f * fabsf( c )) / (400.0f - fabsf( c )), 2.38095238f ); + return (100.0f / fl) * pow_F ( (27.13f * fabsf ( c )) / (400.0f - fabsf ( c )), 2.38095238f ); } #ifdef __SSE2__ -vfloat Ciecam02::inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ) +vfloat Ciecam02::inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ) { - c -= F2V(0.1f); - fl = vmulsignf(fl, c); - c = vabsf(c); - c = _mm_min_ps( c, F2V(399.99f)); - return (F2V(100.0f) / fl) * pow_F( (F2V(27.13f) * c) / (F2V(400.0f) - c), F2V(2.38095238f) ); + c -= F2V (0.1f); + fl = vmulsignf (fl, c); + c = vabsf (c); + c = _mm_min_ps ( c, F2V (399.99f)); + return (F2V (100.0f) / fl) * pow_F ( (F2V (27.13f) * c) / (F2V (400.0f) - c), F2V (2.38095238f) ); } #endif //end CIECAM Billy Bigg diff --git a/rtengine/ciecam02.h b/rtengine/ciecam02.h index 76a7cf5bb..1e0f755c1 100644 --- a/rtengine/ciecam02.h +++ b/rtengine/ciecam02.h @@ -28,12 +28,12 @@ namespace rtengine class Ciecam02 { private: - static double d_factor( double f, double la ); - static float d_factorfloat( float f, float la ); - static double calculate_fl_from_la_ciecam02( double la ); - static float calculate_fl_from_la_ciecam02float( float la ); - static double achromatic_response_to_white( double x, double y, double z, double d, double fl, double nbb, int gamu ); - static float achromatic_response_to_whitefloat( float x, float y, float z, float d, float fl, float nbb, int gamu ); + static double d_factor ( double f, double la ); + static float d_factorfloat ( float f, float la ); + static double calculate_fl_from_la_ciecam02 ( double la ); + static float calculate_fl_from_la_ciecam02float ( float la ); + static double achromatic_response_to_white ( double x, double y, double z, double d, double fl, double nbb, int gamu ); + static float achromatic_response_to_whitefloat ( float x, float y, float z, float d, float fl, float nbb, int gamu ); static void xyz_to_cat02 ( double &r, double &g, double &b, double x, double y, double z, int gamu ); static void cat02_to_hpe ( double &rh, double &gh, double &bh, double r, double g, double b, int gamu ); static void cat02_to_xyz ( double &x, double &y, double &z, double r, double g, double b, int gamu ); @@ -45,97 +45,97 @@ private: #ifdef __SSE2__ static void xyz_to_cat02float ( vfloat &r, vfloat &g, vfloat &b, vfloat x, vfloat y, vfloat z ); static void cat02_to_hpefloat ( vfloat &rh, vfloat &gh, vfloat &bh, vfloat r, vfloat g, vfloat b ); - static vfloat nonlinear_adaptationfloat( vfloat c, vfloat fl ); + static vfloat nonlinear_adaptationfloat ( vfloat c, vfloat fl ); #endif - static void Aab_to_rgb( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); - static void calculate_ab( double &aa, double &bb, double h, double e, double t, double nbb, double a ); + static void Aab_to_rgb ( double &r, double &g, double &b, double A, double aa, double bb, double nbb ); + static void calculate_ab ( double &aa, double &bb, double h, double e, double t, double nbb, double a ); - static double nonlinear_adaptation( double c, double fl ); - static float nonlinear_adaptationfloat( float c, float fl ); - static double inverse_nonlinear_adaptation( double c, double fl ); + static double nonlinear_adaptation ( double c, double fl ); + static float nonlinear_adaptationfloat ( float c, float fl ); + static double inverse_nonlinear_adaptation ( double c, double fl ); - static float inverse_nonlinear_adaptationfloat( float c, float fl ); - static void calculate_abfloat( float &aa, float &bb, float h, float e, float t, float nbb, float a ); - static void Aab_to_rgbfloat( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); + static float inverse_nonlinear_adaptationfloat ( float c, float fl ); + static void calculate_abfloat ( float &aa, float &bb, float h, float e, float t, float nbb, float a ); + static void Aab_to_rgbfloat ( float &r, float &g, float &b, float A, float aa, float bb, float nbb ); static void hpe_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b ); static void cat02_to_xyzfloat ( float &x, float &y, float &z, float r, float g, float b, int gamu ); #ifdef __SSE2__ - static vfloat inverse_nonlinear_adaptationfloat( vfloat c, vfloat fl ); - static void calculate_abfloat( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); - static void Aab_to_rgbfloat( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); + static vfloat inverse_nonlinear_adaptationfloat ( vfloat c, vfloat fl ); + static void calculate_abfloat ( vfloat &aa, vfloat &bb, vfloat h, vfloat e, vfloat t, vfloat nbb, vfloat a ); + static void Aab_to_rgbfloat ( vfloat &r, vfloat &g, vfloat &b, vfloat A, vfloat aa, vfloat bb, vfloat nbb ); static void hpe_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); static void cat02_to_xyzfloat ( vfloat &x, vfloat &y, vfloat &z, vfloat r, vfloat g, vfloat b ); #endif public: Ciecam02 () {} - static void curvecolor(double satind, double satval, double &sres, double parsat); - static void curvecolorfloat(float satind, float satval, float &sres, float parsat); - static void curveJ (double br, double contr, int db, LUTf & outCurve , LUTu & histogram ) ; + static void curvecolor (double satind, double satval, double &sres, double parsat); + static void curvecolorfloat (float satind, float satval, float &sres, float parsat); + static void curveJ (double br, double contr, int db, LUTf & outCurve, LUTu & histogram ) ; static void curveJfloat (float br, float contr, const LUTu & histogram, LUTf & outCurve ) ; /** * Inverse transform from CIECAM02 JCh to XYZ. */ - static void jch2xyz_ciecam02( double &x, double &y, double &z, - double J, double C, double h, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); + static void jch2xyz_ciecam02 ( double &x, double &y, double &z, + double J, double C, double h, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, int gamu, double n, double nbb, double ncb, double fl, double cz, double d, double aw); - static void jch2xyz_ciecam02float( float &x, float &y, float &z, - float J, float C, float h, - float xw, float yw, float zw, - float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); + static void jch2xyz_ciecam02float ( float &x, float &y, float &z, + float J, float C, float h, + float xw, float yw, float zw, + float f, float c, float nc, int gamu, float n, float nbb, float ncb, float fl, float cz, float d, float aw ); #ifdef __SSE2__ - static void jch2xyz_ciecam02float( vfloat &x, vfloat &y, vfloat &z, - vfloat J, vfloat C, vfloat h, - vfloat xw, vfloat yw, vfloat zw, - vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); + static void jch2xyz_ciecam02float ( vfloat &x, vfloat &y, vfloat &z, + vfloat J, vfloat C, vfloat h, + vfloat xw, vfloat yw, vfloat zw, + vfloat f, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat fl, vfloat d, vfloat aw, vfloat reccmcz ); #endif /** * Forward transform from XYZ to CIECAM02 JCh. */ - static void initcam1(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); + static void initcam1 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &wh, double &pfl, double &fl, double &c); - static void initcam2(double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, - double &cz, double &aw, double &fl); + static void initcam2 (double gamu, double yb, double pilotd, double f, double la, double xw, double yw, double zw, double &n, double &d, double &nbb, double &ncb, + double &cz, double &aw, double &fl); - static void initcam1float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); + static void initcam1float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &wh, float &pfl, float &fl, float &c); - static void initcam2float(float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, - float &cz, float &aw, float &fl); + static void initcam2float (float gamu, float yb, float pilotd, float f, float la, float xw, float yw, float zw, float &n, float &d, float &nbb, float &ncb, + float &cz, float &aw, float &fl); - static void xyz2jchqms_ciecam02( double &J, double &C, double &h, - double &Q, double &M, double &s, double &aw, double &fl, double &wh, - double x, double y, double z, - double xw, double yw, double zw, - double yb, double la, - double f, double c, double nc, double pilotd, int gamu , double n, double nbb, double ncb, double pfl, double cz, double d ); + static void xyz2jchqms_ciecam02 ( double &J, double &C, double &h, + double &Q, double &M, double &s, double &aw, double &fl, double &wh, + double x, double y, double z, + double xw, double yw, double zw, + double yb, double la, + double f, double c, double nc, double pilotd, int gamu, double n, double nbb, double ncb, double pfl, double cz, double d ); - static void xyz2jch_ciecam02float( float &J, float &C, float &h, - float aw, float fl, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, float n, float nbb, float ncb, float cz, float d ); + static void xyz2jch_ciecam02float ( float &J, float &C, float &h, + float aw, float fl, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, float n, float nbb, float ncb, float cz, float d ); - static void xyz2jchqms_ciecam02float( float &J, float &C, float &h, - float &Q, float &M, float &s, float aw, float fl, float wh, - float x, float y, float z, - float xw, float yw, float zw, - float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); + static void xyz2jchqms_ciecam02float ( float &J, float &C, float &h, + float &Q, float &M, float &s, float aw, float fl, float wh, + float x, float y, float z, + float xw, float yw, float zw, + float c, float nc, int gamu, float n, float nbb, float ncb, float pfl, float cz, float d ); #ifdef __SSE2__ - static void xyz2jchqms_ciecam02float( vfloat &J, vfloat &C, vfloat &h, - vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, - vfloat x, vfloat y, vfloat z, - vfloat xw, vfloat yw, vfloat zw, - vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); + static void xyz2jchqms_ciecam02float ( vfloat &J, vfloat &C, vfloat &h, + vfloat &Q, vfloat &M, vfloat &s, vfloat aw, vfloat fl, vfloat wh, + vfloat x, vfloat y, vfloat z, + vfloat xw, vfloat yw, vfloat zw, + vfloat c, vfloat nc, vfloat n, vfloat nbb, vfloat ncb, vfloat pfl, vfloat cz, vfloat d ); #endif diff --git a/rtengine/improccoordinator.cc b/rtengine/improccoordinator.cc index d288a23c1..d5032cd46 100644 --- a/rtengine/improccoordinator.cc +++ b/rtengine/improccoordinator.cc @@ -33,48 +33,48 @@ namespace rtengine extern const Settings* settings; ImProcCoordinator::ImProcCoordinator () - : orig_prev(nullptr), oprevi(nullptr), oprevl(nullptr), nprevl(nullptr), previmg(nullptr), workimg(nullptr), - ncie(nullptr), imgsrc(nullptr), shmap(nullptr), lastAwbEqual(0.), lastAwbTempBias(0.0), ipf(¶ms, true), monitorIntent(RI_RELATIVE), - softProof(false), gamutCheck(false), scale(10), highDetailPreprocessComputed(false), highDetailRawComputed(false), - allocated(false), bwAutoR(-9000.f), bwAutoG(-9000.f), bwAutoB(-9000.f), CAMMean(NAN), + : orig_prev (nullptr), oprevi (nullptr), oprevl (nullptr), nprevl (nullptr), previmg (nullptr), workimg (nullptr), + ncie (nullptr), imgsrc (nullptr), shmap (nullptr), lastAwbEqual (0.), lastAwbTempBias (0.0), ipf (¶ms, true), monitorIntent (RI_RELATIVE), + softProof (false), gamutCheck (false), scale (10), highDetailPreprocessComputed (false), highDetailRawComputed (false), + allocated (false), bwAutoR (-9000.f), bwAutoG (-9000.f), bwAutoB (-9000.f), CAMMean (NAN), - hltonecurve(65536), - shtonecurve(65536), - tonecurve(65536, 0), //,1); - lumacurve(32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - chroma_acurve(65536, 0), - chroma_bcurve(65536, 0), - satcurve(65536, 0), - lhskcurve(65536, 0), - clcurve(65536, 0), - conversionBuffer(1, 1), - wavclCurve(65536, 0), - clToningcurve(65536, 0), - cl2Toningcurve(65536, 0), - Noisecurve(65536, 0), - NoiseCCcurve(65536, 0), - vhist16(65536), vhist16bw(65536), - lhist16CAM(65536), - lhist16CCAM(65536), + hltonecurve (65536), + shtonecurve (65536), + tonecurve (65536, 0), //,1); + lumacurve (32770, 0), // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + chroma_acurve (65536, 0), + chroma_bcurve (65536, 0), + satcurve (65536, 0), + lhskcurve (65536, 0), + clcurve (65536, 0), + conversionBuffer (1, 1), + wavclCurve (65536, 0), + clToningcurve (65536, 0), + cl2Toningcurve (65536, 0), + Noisecurve (65536, 0), + NoiseCCcurve (65536, 0), + vhist16 (65536), vhist16bw (65536), + lhist16CAM (65536), + lhist16CCAM (65536), lhist16RETI(), - lhist16LClad(65536), - histRed(256), histRedRaw(256), - histGreen(256), histGreenRaw(256), - histBlue(256), histBlueRaw(256), - histLuma(256), - histToneCurve(256), - histToneCurveBW(256), - histLCurve(256), - histCCurve(256), - histLLCurve(256), + lhist16LClad (65536), + histRed (256), histRedRaw (256), + histGreen (256), histGreenRaw (256), + histBlue (256), histBlueRaw (256), + histLuma (256), + histToneCurve (256), + histToneCurveBW (256), + histLCurve (256), + histCCurve (256), + histLLCurve (256), - histLCAM(256), - histCCAM(256), - histClad(256), - bcabhist(256), - histChroma(256), + histLCAM (256), + histCCAM (256), + histClad (256), + bcabhist (256), + histChroma (256), - histLRETI(256), + histLRETI (256), CAMBrightCurveJ(), CAMBrightCurveQ(), @@ -82,15 +82,15 @@ ImProcCoordinator::ImProcCoordinator () gCurve(), bCurve(), ctColorCurve(), - rcurvehist(256), rcurvehistCropped(256), rbeforehist(256), - gcurvehist(256), gcurvehistCropped(256), gbeforehist(256), - bcurvehist(256), bcurvehistCropped(256), bbeforehist(256), - fw(0), fh(0), tr(0), - fullw(1), fullh(1), - pW(-1), pH(-1), - plistener(nullptr), imageListener(nullptr), aeListener(nullptr), acListener(nullptr), abwListener(nullptr), awbListener(nullptr), frameCountListener(nullptr), imageTypeListener(nullptr), actListener(nullptr), adnListener(nullptr), awavListener(nullptr), dehaListener(nullptr), hListener(nullptr), - resultValid(false), lastOutputProfile("BADFOOD"), lastOutputIntent(RI__COUNT), lastOutputBPC(false), thread(nullptr), changeSinceLast(0), updaterRunning(false), destroying(false), utili(false), autili(false), - butili(false), ccutili(false), cclutili(false), clcutili(false), opautili(false), wavcontlutili(false), colourToningSatLimit(0.f), colourToningSatLimitOpacity(0.f) + rcurvehist (256), rcurvehistCropped (256), rbeforehist (256), + gcurvehist (256), gcurvehistCropped (256), gbeforehist (256), + bcurvehist (256), bcurvehistCropped (256), bbeforehist (256), + fw (0), fh (0), tr (0), + fullw (1), fullh (1), + pW (-1), pH (-1), + plistener (nullptr), imageListener (nullptr), aeListener (nullptr), acListener (nullptr), abwListener (nullptr), awbListener (nullptr), frameCountListener (nullptr), imageTypeListener (nullptr), actListener (nullptr), adnListener (nullptr), awavListener (nullptr), dehaListener (nullptr), hListener (nullptr), + resultValid (false), lastOutputProfile ("BADFOOD"), lastOutputIntent (RI__COUNT), lastOutputBPC (false), thread (nullptr), changeSinceLast (0), updaterRunning (false), destroying (false), utili (false), autili (false), + butili (false), ccutili (false), cclutili (false), clcutili (false), opautili (false), wavcontlutili (false), colourToningSatLimit (0.f), colourToningSatLimitOpacity (0.f) {} void ImProcCoordinator::assign (ImageSource* imgsrc) @@ -134,7 +134,7 @@ DetailedCrop* ImProcCoordinator::createCrop (::EditDataProvider *editDataProvid void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) { - MyMutex::MyLock processingLock(mProcessing); + MyMutex::MyLock processingLock (mProcessing); int numofphases = 14; int readyphase = 0; @@ -165,15 +165,15 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) ColorManagementParams cmp = params.icm; LCurveParams lcur = params.labCurve; - if( !highDetailNeeded ) { + if ( !highDetailNeeded ) { // if below 100% magnification, take a fast path - if(rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { + if (rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::none] && rp.bayersensor.method != RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::mono]) { rp.bayersensor.method = RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::fast]; } //bayerrp.all_enhance = false; - if(rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { + if (rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::none] && rp.xtranssensor.method != RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::mono]) { rp.xtranssensor.method = RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::fast]; } @@ -184,16 +184,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Applying white balance, color correction & sRGB conversion...", 100 * readyphase / numofphases); - if(frameCountListener) { - frameCountListener->FrameCountChanged(imgsrc->getFrameCount(), params.raw.bayersensor.imageNum); + if (frameCountListener) { + frameCountListener->FrameCountChanged (imgsrc->getFrameCount(), params.raw.bayersensor.imageNum); } // raw auto CA is bypassed if no high detail is needed, so we have to compute it when high detail is needed if ( (todo & M_PREPROC) || (!highDetailPreprocessComputed && highDetailNeeded)) { - imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); - imgsrc->preprocess( rp, params.lensProf, params.coarse ); - imgsrc->getRAWHistogram( histRedRaw, histGreenRaw, histBlueRaw ); + imgsrc->preprocess ( rp, params.lensProf, params.coarse ); + imgsrc->getRAWHistogram ( histRedRaw, histGreenRaw, histBlueRaw ); if (highDetailNeeded) { highDetailPreprocessComputed = true; @@ -214,8 +214,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) */ // If high detail (=100%) is newly selected, do a demosaic update, since the last was just with FAST - if(imageTypeListener) { - imageTypeListener->imageTypeChanged(imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS); + if (imageTypeListener) { + imageTypeListener->imageTypeChanged (imgsrc->isRAW(), imgsrc->getSensorType() == ST_BAYER, imgsrc->getSensorType() == ST_FUJI_XTRANS); } if ( (todo & M_RAW) @@ -225,13 +225,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) if (settings->verbose) { if (imgsrc->getSensorType() == ST_BAYER) { - printf("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str()); + printf ("Demosaic Bayer image n.%d using method: %s\n", rp.bayersensor.imageNum + 1, rp.bayersensor.method.c_str()); } else if (imgsrc->getSensorType() == ST_FUJI_XTRANS) { - printf("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str()); + printf ("Demosaic X-Trans image with using method: %s\n", rp.xtranssensor.method.c_str()); } } - imgsrc->demosaic( rp);//enabled demosaic + imgsrc->demosaic ( rp); //enabled demosaic // if a demosaic happened we should also call getimage later, so we need to set the M_INIT flag todo |= M_INIT; @@ -242,10 +242,10 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (params.retinex.enabled) { - lhist16RETI(32768); + lhist16RETI (32768); lhist16RETI.clear(); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, lhist16RETI); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, lhist16RETI); } } @@ -256,12 +256,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, lhist16RETI, histLRETI); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI);//enabled Retinex + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, histLRETI); //enabled Retinex - if(dehaListener) { - dehaListener->minmaxChanged(maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); + if (dehaListener) { + dehaListener->minmaxChanged (maxCD, minCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax); } } @@ -270,7 +270,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // It has to be done there, because the next 'if' statement will use the value computed here if (todo & M_AUTOEXP) { if (params.toneCurve.autoexp) {// this enabled HLRecovery - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { // switching params.toneCurve.hrenabled to true -> shouting in listener's ears! params.toneCurve.hrenabled = true; @@ -281,9 +281,9 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } if (todo & (M_INIT | M_LINDENOISE)) { - MyMutex::MyLock initLock(minit); // Also used in crop window + MyMutex::MyLock initLock (minit); // Also used in crop window - imgsrc->HLRecovery_Global( params.toneCurve); // this handles Color HLRecovery + imgsrc->HLRecovery_Global ( params.toneCurve); // this handles Color HLRecovery if (settings->verbose) { @@ -297,16 +297,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } else if (params.wb.method == "Auto") { if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; lastAwbTempBias = 0.0; - autoWB.useDefaults(params.wb.equal); + autoWB.useDefaults (params.wb.equal); } //double rr,gg,bb; @@ -318,11 +318,12 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) params.wb.temperature = currWB.getTemp (); params.wb.green = currWB.getGreen (); - if(params.wb.method == "Auto" && awbListener) { - awbListener->WBChanged(params.wb.temperature, params.wb.green); + + if (params.wb.method == "Auto" && awbListener) { + awbListener->WBChanged (params.wb.temperature, params.wb.green); } - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fw, fh, tr); @@ -377,7 +378,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - imgsrc->convertColorSpace(orig_prev, params.icm, currWB); + imgsrc->convertColorSpace (orig_prev, params.icm, currWB); ipf.firstAnalysis (orig_prev, params, vhist16); } @@ -388,42 +389,45 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Remove transformation if unneeded bool needstransform = ipf.needsTransform(); - if (!needstransform && !((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { + if (!needstransform && ! ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) && orig_prev != oprevi) { delete oprevi; oprevi = orig_prev; } if ((needstransform || ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled)) ) { - if(!oprevi || oprevi == orig_prev) + if (!oprevi || oprevi == orig_prev) { oprevi = new Imagefloat (pW, pH); + } + if (needstransform) ipf.transform (orig_prev, oprevi, 0, 0, 0, 0, pW, pH, fw, fh, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), imgsrc->getMetaData()->getFNumber(), imgsrc->getRotateDegree(), false); - else - orig_prev->copyData(oprevi); + else { + orig_prev->copyData (oprevi); + } } if ((todo & (M_TRANSFORM | M_RGBCURVE)) && params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = oprevi->getWidth(); const int H = oprevi->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*oprevi, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + ipf.rgb2lab (*oprevi, labcbdl, params.icm.working); ipf.dirpyrequalizer (&labcbdl, scale); - ipf.lab2rgb(labcbdl, *oprevi, params.icm.working); + ipf.lab2rgb (labcbdl, *oprevi, params.icm.working); } readyphase++; progress ("Preparing shadow/highlight map...", 100 * readyphase / numofphases); if ((todo & M_BLURMAP) && params.sh.enabled) { - double radius = sqrt (double(pW * pW + pH * pH)) / 2.0; + double radius = sqrt (double (pW * pW + pH * pH)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { shradius *= radius / 1800.0; } - if(!shmap) { + if (!shmap) { shmap = new SHMap (pW, pH, true); } @@ -467,7 +471,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -480,34 +484,34 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, vhist16bw, histToneCurveBW, beforeToneCurveBW, afterToneCurveBW, 1); } - colourToningSatLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - colourToningSatLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + colourToningSatLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + colourToningSatLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); int satTH = 80; int satPR = 30; int indi = 0; - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (oprevi, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -520,22 +524,22 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) satPR = (int) 100.f * (moyS - 0.85f * eqty); } - if(actListener) { + if (actListener) { //if(params.blackwhite.enabled) {actListener->autoColorTonChanged(0, satTH, satPR);} - if(params.blackwhite.enabled && params.colorToning.autosat) { - actListener->autoColorTonChanged(0, satTH, satPR); //hide sliders only if autosat + if (params.blackwhite.enabled && params.colorToning.autosat) { + actListener->autoColorTonChanged (0, satTH, satPR); //hide sliders only if autosat indi = 0; } else { - if(params.colorToning.autosat) { + if (params.colorToning.autosat) { if (params.colorToning.method == "Lab") { indi = 1; - } else if(params.colorToning.method == "RGBCurves") { + } else if (params.colorToning.method == "RGBCurves") { indi = 1; - } else if(params.colorToning.method == "RGBSliders") { + } else if (params.colorToning.method == "RGBSliders") { indi = 1; - } else if(params.colorToning.method == "Splico") { + } else if (params.colorToning.method == "Splico") { indi = 2; - } else if(params.colorToning.method == "Splitlr") { + } else if (params.colorToning.method == "Splitlr") { indi = 2; } @@ -552,25 +556,25 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double bbm = 33.; DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); ipf.rgbProc (oprevi, oprevl, nullptr, hltonecurve, shtonecurve, tonecurve, shmap, params.toneCurve.saturation, - rCurve, gCurve, bCurve, colourToningSatLimit , colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); + rCurve, gCurve, bCurve, colourToningSatLimit, colourToningSatLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, beforeToneCurveBW, afterToneCurveBW, rrm, ggm, bbm, bwAutoR, bwAutoG, bwAutoB, params.toneCurve.expcomp, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh, dcpProf, as, histToneCurve); - if(params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { + if (params.blackwhite.enabled && params.blackwhite.autoc && abwListener) { if (settings->verbose) { - printf("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); + printf ("ImProcCoordinator / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", bwAutoR, bwAutoG, bwAutoB); } - abwListener->BWChanged((float) rrm, (float) ggm, (float) bbm); + abwListener->BWChanged ((float) rrm, (float) ggm, (float) bbm); } - if(params.colorToning.autosat && actListener) { + if (params.colorToning.autosat && actListener) { if (settings->verbose) { - printf("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit , (int) colourToningSatLimitOpacity); + printf ("ImProcCoordinator / Auto CT: indi=%d satH=%d satPR=%d\n", indi, (int)colourToningSatLimit, (int) colourToningSatLimitOpacity); } - actListener->autoColorTonChanged(indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity);//change sliders autosat + actListener->autoColorTonChanged (indi, (int) colourToningSatLimit, (int)colourToningSatLimitOpacity); //change sliders autosat } // correct GUI black and white with value @@ -578,20 +582,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // compute L channel histogram int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); } readyphase++; if (todo & (M_LUMACURVE | M_CROP)) { - LUTu lhist16(32768); + LUTu lhist16 (32768); lhist16.clear(); #ifdef _OPENMP - const int numThreads = min(max(pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); + const int numThreads = min (max (pW * pH / (int)lhist16.getSize(), 1), omp_get_max_threads()); #pragma omp parallel num_threads(numThreads) if(numThreads>1) #endif { - LUTu lhist16thr(lhist16.getSize()); + LUTu lhist16thr (lhist16.getSize()); lhist16thr.clear(); #ifdef _OPENMP #pragma omp for nowait @@ -599,7 +603,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = (int)(oprevl->L[x][y]); + int pos = (int) (oprevl->L[x][y]); lhist16thr[pos]++; } @@ -609,31 +613,31 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) lhist16 += lhist16thr; } #ifdef _OPENMP - static_cast(numThreads); // to silence cppcheck warning + static_cast (numThreads); // to silence cppcheck warning #endif CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, lhist16, lumacurve, histLCurve, scale == 1 ? 1 : 16, utili); } if (todo & M_LUMACURVE) { - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, scale == 1 ? 1 : 16); CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, params.labCurve.lccurve, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, scale == 1 ? 1 : 16); } if (todo & (M_LUMINANCE + M_COLOR) ) { - nprevl->CopyFrom(oprevl); + nprevl->CopyFrom (oprevl); progress ("Applying Color Boost...", 100 * readyphase / numofphases); // ipf.MSR(nprevl, nprevl->W, nprevl->H, 1); histCCurve.clear(); histLCurve.clear(); ipf.chromiLuminanceCurve (nullptr, pW, nprevl, nprevl, chroma_acurve, chroma_bcurve, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, histCCurve, histLCurve); - ipf.vibrance(nprevl); + ipf.vibrance (nprevl); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(nprevl, 5, scale); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (nprevl, 5, scale); } // for all treatments Defringe, Sharpening, Contrast detail , Microcontrast they are activated if "CIECAM" function are disabled @@ -679,8 +683,8 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } } */ - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) ) { progress ("Pyramid wavelet...", 100 * readyphase / numofphases); ipf.dirpyrequalizer (nprevl, scale); //ipf.Lanczoslab (ip_wavelet(LabImage * lab, LabImage * dst, const procparams::EqualizerParams & eqparams), nprevl, 1.f/scale); @@ -691,35 +695,35 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) wavcontlutili = false; //CurveFactory::curveWavContL ( wavcontlutili,params.wavelet.lcurve, wavclCurve, LUTu & histogramwavcl, LUTu & outBeforeWavCLurveHistogram,int skip); - CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16); + CurveFactory::curveWavContL (wavcontlutili, params.wavelet.wavclCurve, wavclCurve, scale == 1 ? 1 : 16); - if((params.wavelet.enabled)) { + if ((params.wavelet.enabled)) { WaveletParams WaveParams = params.wavelet; // WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY); - WaveParams.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); + WaveParams.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL); int kall = 0; progress ("Wavelet...", 100 * readyphase / numofphases); // ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, scale); - ipf.ip_wavelet(nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); + ipf.ip_wavelet (nprevl, nprevl, kall, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, scale); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { //L histo and Chroma histo for ciecam // histogram well be for Lab (Lch) values, because very difficult to do with J,Q, M, s, C int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); lhist16CAM.clear(); lhist16CCAM.clear(); - if(!params.colorappearance.datacie) { + if (!params.colorappearance.datacie) { for (int x = 0; x < pH; x++) for (int y = 0; y < pW; y++) { - int pos = CLIP((int)(nprevl->L[x][y])); - int posc = CLIP((int)sqrt(nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); + int pos = CLIP ((int) (nprevl->L[x][y])); + int posc = CLIP ((int)sqrt (nprevl->a[x][y] * nprevl->a[x][y] + nprevl->b[x][y] * nprevl->b[x][y])); lhist16CAM[pos]++; lhist16CCAM[posc]++; } @@ -734,13 +738,13 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) double fcomp = imgsrc->getMetaData()->getExpComp (); // Compensation +/- double adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { //if no exif data or wrong adap = 2000.; } else { - double E_V = fcomp + log2 (double((fnum * fnum) / fspeed / (fiso / 100.f))); + double E_V = fcomp + log2 (double ((fnum * fnum) / fspeed / (fiso / 100.f))); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); // cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); // cd / m2 // end calculation adaptation scene luminosity } @@ -749,16 +753,16 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) float d, dj, yb; bool execsharp = false; - if(!ncie) { + if (!ncie) { ncie = new CieImage (pW, pH); } if (!CAMBrightCurveJ && (params.colorappearance.algo == "JC" || params.colorappearance.algo == "JS" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveJ(32768, 0); + CAMBrightCurveJ (32768, 0); } if (!CAMBrightCurveQ && (params.colorappearance.algo == "QM" || params.colorappearance.algo == "ALL")) { - CAMBrightCurveQ(32768, 0); + CAMBrightCurveQ (32768, 0); } // Issue 2785, only float version of ciecam02 for navigator and pan background @@ -766,20 +770,20 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) CAMBrightCurveJ.dirty = true; CAMBrightCurveQ.dirty = true; - ipf.ciecam_02float (ncie, float(adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); + ipf.ciecam_02float (ncie, float (adap), begh, endh, pW, 2, nprevl, ¶ms, customColCurve1, customColCurve2, customColCurve3, histLCAM, histCCAM, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, scale, execsharp, d, dj, yb, 1); - if((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { - acListener->autoCamChanged(100.*(double)d, 100.*(double)dj); + if ((params.colorappearance.autodegree || params.colorappearance.autodegreeout) && acListener && params.colorappearance.enabled) { + acListener->autoCamChanged (100.* (double)d, 100.* (double)dj); } - if(params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { - acListener->adapCamChanged(adap); //real value of adapt scene + if (params.colorappearance.autoadapscen && acListener && params.colorappearance.enabled) { + acListener->adapCamChanged (adap); //real value of adapt scene } - if(params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { - acListener->ybCamChanged((int) yb); //real value Yb scene + if (params.colorappearance.autoybscen && acListener && params.colorappearance.enabled) { + acListener->ybCamChanged ((int) yb); //real value Yb scene } - + readyphase++; } else { // CIECAM is disabled, we free up its image buffer to save some space @@ -800,11 +804,11 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) } // Update the monitor color transform if necessary - if ((todo & M_MONITOR) || (lastOutputProfile!=params.icm.output) || lastOutputIntent!=params.icm.outputIntent || lastOutputBPC!=params.icm.outputBPC) { + if ((todo & M_MONITOR) || (lastOutputProfile != params.icm.output) || lastOutputIntent != params.icm.outputIntent || lastOutputBPC != params.icm.outputBPC) { lastOutputProfile = params.icm.output; lastOutputIntent = params.icm.outputIntent; lastOutputBPC = params.icm.outputBPC; - ipf.updateColorProfiles(monitorProfile, monitorIntent, softProof, gamutCheck); + ipf.updateColorProfiles (monitorProfile, monitorIntent, softProof, gamutCheck); } // process crop, if needed @@ -816,7 +820,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) progress ("Conversion to RGB...", 100 * readyphase / numofphases); if ((todo != CROP && todo != MINUPDATE) || (todo & M_MONITOR)) { - MyMutex::MyLock prevImgLock(previmg->getMutex()); + MyMutex::MyLock prevImgLock (previmg->getMutex()); try { // Computing the preview image, i.e. converting from WCS->Monitor color space (soft-proofing disabled) or WCS->Printer profile->Monitor color space (soft-proofing enabled) @@ -825,7 +829,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall) // Computing the internal image for analysis, i.e. conversion from WCS->Output profile delete workimg; workimg = ipf.lab2rgb (nprevl, 0, 0, pW, pH, params.icm); - } catch(char * str) { + } catch (char * str) { progress ("Error converting file...", 0); return; } @@ -889,7 +893,7 @@ void ImProcCoordinator::freeAll () delete workimg; - if(shmap) { + if (shmap) { delete shmap; } @@ -913,7 +917,7 @@ void ImProcCoordinator::setScale (int prevscale) printf ("setscale before lock\n"); } - tr = getCoarseBitMask(params.coarse); + tr = getCoarseBitMask (params.coarse); int nW, nH; imgsrc->getFullSize (fw, fh, tr); @@ -924,7 +928,7 @@ void ImProcCoordinator::setScale (int prevscale) prevscale--; PreviewProps pp (0, 0, fw, fh, prevscale); imgsrc->getSize (pp, nW, nH); - } while(nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // sctually hardcoded values, perhaps a better choice is possible + } while (nH < 400 && prevscale > 1 && (nW * nH < 1000000) ); // sctually hardcoded values, perhaps a better choice is possible if (settings->verbose) { printf ("setscale starts (%d, %d)\n", nW, nH); @@ -945,7 +949,7 @@ void ImProcCoordinator::setScale (int prevscale) previmg = new Image8 (pW, pH); workimg = new Image8 (pW, pH); - if(params.sh.enabled) { + if (params.sh.enabled) { shmap = new SHMap (pW, pH, true); } @@ -977,7 +981,7 @@ void ImProcCoordinator::updateLRGBHistograms () { int x1, y1, x2, y2; - params.crop.mapToResized(pW, pH, scale, x1, x2, y1, y2); + params.crop.mapToResized (pW, pH, scale, x1, x2, y1, y2); #pragma omp parallel sections { @@ -988,7 +992,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histChroma[(int)(sqrtf(SQR(nprevl->a[i][j]) + SQR(nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 + histChroma[ (int) (sqrtf (SQR (nprevl->a[i][j]) + SQR (nprevl->b[i][j])) / 188.f)]++; //188 = 48000/256 } } #pragma omp section @@ -998,7 +1002,7 @@ void ImProcCoordinator::updateLRGBHistograms () for (int i = y1; i < y2; i++) for (int j = x1; j < x2; j++) { - histLuma[(int)(nprevl->L[i][j] / 128.f)]++; + histLuma[ (int) (nprevl->L[i][j] / 128.f)]++; } } #pragma omp section @@ -1042,15 +1046,15 @@ bool ImProcCoordinator::getAutoWB (double& temp, double& green, double equal, do if (lastAwbEqual != equal || lastAwbTempBias != tempBias) { // Issue 2500 MyMutex::MyLock lock(minit); // Also used in crop window double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1) { - autoWB.update(rm, gm, bm, equal, tempBias); + autoWB.update (rm, gm, bm, equal, tempBias); lastAwbEqual = equal; lastAwbTempBias = tempBias; } else { lastAwbEqual = -1.; - autoWB.useDefaults(equal); + autoWB.useDefaults (equal); lastAwbTempBias = 0.0; } } @@ -1081,7 +1085,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ColorTemp ret; { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); std::vector points, red, green, blue; for (int i = y - rect; i <= y + rect; i++) @@ -1091,7 +1095,7 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); ret = imgsrc->getSpotWB (red, green, blue, tr, params.wb.equal); currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); @@ -1112,15 +1116,15 @@ void ImProcCoordinator::getSpotWB (int x, int y, int rect, double& temp, double& void ImProcCoordinator::getAutoCrop (double ratio, int &x, int &y, int &w, int &h) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); LCPMapper *pLCPMap = nullptr; if (params.lensProf.lcpFile.length() && imgsrc->getMetaData()->getFocalLen() > 0) { - LCPProfile *pLCPProf = lcpStore->getProfile(params.lensProf.lcpFile); + LCPProfile *pLCPProf = lcpStore->getProfile (params.lensProf.lcpFile); - if (pLCPProf) pLCPMap = new LCPMapper(pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), - 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); + if (pLCPProf) pLCPMap = new LCPMapper (pLCPProf, imgsrc->getMetaData()->getFocalLen(), imgsrc->getMetaData()->getFocalLen35mm(), imgsrc->getMetaData()->getFocusDist(), + 0, false, params.lensProf.useDist, fullw, fullh, params.coarse, imgsrc->getRotateDegree()); } double fillscale = ipf.getTransformAutoFill (fullw, fullh, pLCPMap); @@ -1169,11 +1173,11 @@ void ImProcCoordinator::getSoftProofing (bool &softProof, bool &gamutCheck) void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool apply_wb) { - MyMutex::MyLock lock(mProcessing); + MyMutex::MyLock lock (mProcessing); int fW, fH; - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fW, fH, tr); PreviewProps pp (0, 0, fW, fH, 1); @@ -1181,8 +1185,8 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool ppar.toneCurve.hrenabled = false; ppar.icm.input = "(none)"; Imagefloat* im = new Imagefloat (fW, fH); - imgsrc->preprocess( ppar.raw, ppar.lensProf, ppar.coarse ); - imgsrc->demosaic(ppar.raw ); + imgsrc->preprocess ( ppar.raw, ppar.lensProf, ppar.coarse ); + imgsrc->demosaic (ppar.raw ); ColorTemp currWB = ColorTemp (params.wb.temperature, params.wb.green, params.wb.equal, params.wb.method); if (params.wb.method == "Camera") { @@ -1190,16 +1194,16 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool } else if (params.wb.method == "Auto") { if (lastAwbEqual != params.wb.equal || lastAwbTempBias != params.wb.tempBias) { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); + imgsrc->getAutoWBMultipliers (rm, gm, bm); if (rm != -1.) { - autoWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + autoWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); lastAwbEqual = params.wb.equal; lastAwbTempBias = params.wb.tempBias; } else { lastAwbEqual = -1.; lastAwbTempBias = 0.0; - autoWB.useDefaults(params.wb.equal); + autoWB.useDefaults (params.wb.equal); } } @@ -1231,9 +1235,9 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool for (int i = cy; i < cy + ch; i++) { for (int j = cx; j < cx + cw; j++) { - tmpim->r(i - cy, j - cx) = im->r(i, j); - tmpim->g(i - cy, j - cx) = im->g(i, j); - tmpim->b(i - cy, j - cx) = im->b(i, j); + tmpim->r (i - cy, j - cx) = im->r (i, j); + tmpim->g (i - cy, j - cx) = im->g (i, j); + tmpim->b (i - cy, j - cx) = im->b (i, j); } } @@ -1244,11 +1248,11 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool // image may contain out of range samples, clip them to avoid wrap-arounds #pragma omp parallel for - for(int i = 0; i < im->getHeight(); i++) { - for(int j = 0; j < im->getWidth(); j++) { - im->r(i, j) = CLIP(im->r(i, j)); - im->g(i, j) = CLIP(im->g(i, j)); - im->b(i, j) = CLIP(im->b(i, j)); + for (int i = 0; i < im->getHeight(); i++) { + for (int j = 0; j < im->getWidth(); j++) { + im->r (i, j) = CLIP (im->r (i, j)); + im->g (i, j) = CLIP (im->g (i, j)); + im->b (i, j) = CLIP (im->b (i, j)); } } @@ -1256,7 +1260,7 @@ void ImProcCoordinator::saveInputICCReference (const Glib::ustring& fname, bool delete im; int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fW, fH, imw, imh); + double tmpScale = ipf.resizeScale (¶ms, fW, fH, imw, imh); if (tmpScale != 1.0) { Image16* tempImage = new Image16 (imw, imh); @@ -1302,13 +1306,13 @@ void ImProcCoordinator::startProcessing () //batchThread->yield(); //the running batch should wait other threads to avoid conflict - thread = Glib::Thread::create(sigc::mem_fun(*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); + thread = Glib::Thread::create (sigc::mem_fun (*this, &ImProcCoordinator::process), 0, true, true, Glib::THREAD_PRIORITY_NORMAL); } } } -void ImProcCoordinator::startProcessing(int changeCode) +void ImProcCoordinator::startProcessing (int changeCode) { paramsUpdateMutex.lock(); changeSinceLast |= changeCode; @@ -1356,7 +1360,7 @@ ProcParams* ImProcCoordinator::beginUpdateParams () void ImProcCoordinator::endUpdateParams (ProcEvent change) { - endUpdateParams( refreshmap[(int)change] ); + endUpdateParams ( refreshmap[ (int)change] ); } void ImProcCoordinator::endUpdateParams (int changeFlags) diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 19fce3a76..41b901e93 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -223,7 +223,7 @@ public: *dst = params; } - void startProcessing(int changeCode); + void startProcessing (int changeCode); ProcParams* beginUpdateParams (); void endUpdateParams (ProcEvent change); // must be called after beginUpdateParams, triggers update void endUpdateParams (int changeFlags); @@ -304,7 +304,7 @@ public: { aeListener = ael; } - void setHistogramListener(HistogramListener *h) + void setHistogramListener (HistogramListener *h) { hListener = h; } @@ -355,7 +355,7 @@ public: } struct DenoiseInfoStore { - DenoiseInfoStore () : chM(0), max_r{}, max_b{}, ch_M{}, valid(false) {} + DenoiseInfoStore () : chM (0), max_r{}, max_b{}, ch_M{}, valid (false) {} float chM; float max_r[9]; float max_b[9]; diff --git a/rtengine/improcfun.cc b/rtengine/improcfun.cc index f67ba3660..7518416cb 100644 --- a/rtengine/improcfun.cc +++ b/rtengine/improcfun.cc @@ -265,11 +265,11 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh double Xw, Zw; double Xwout, Zwout; double Xwsc, Zwsc; - + double f = 0., c = 0., nc = 0., yb = 0., la, xw, yw, zw, f2 = 0., c2 = 0., nc2 = 0., yb2 = 0., la2; double fl, n, nbb, ncb, aw; double xwd = 0., ywd, zwd = 0.; - double xws, yws, zws; + double xws, yws, zws; int alg = 0; bool algepd = false; float sum = 0.f; @@ -298,8 +298,8 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh c = 0.41; nc = 0.8; } - - + + //viewing condition for surround if (params->colorappearance.surround == "Average") { f2 = 1.0, c2 = 0.69, nc2 = 1.0; @@ -316,14 +316,15 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh c2 = 0.41; nc2 = 0.8; } -/* - //scene condition for surround - if (params->colorappearance.surrsource) { - f = 0.85; // if user => source image has surround very dark - c = 0.55; - nc = 0.85; - } -*/ + + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85; // if user => source image has surround very dark + c = 0.55; + nc = 0.85; + } + */ //with which algorithme if (params->colorappearance.algo == "JC") { alg = 0; @@ -383,7 +384,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xws = 100. * Xwsc; zws = 100. * Zwsc; yws = 100. / params->colorappearance.greensc;//approximation to simplify - + /* //settings mean Luminance Y of output device or viewing if (settings->viewingdevicegrey == 0) { @@ -422,7 +423,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh const float degout = (params->colorappearance.degreeout) / 100.0; const float pilotout = params->colorappearance.autodegreeout ? 2.0 : degout; - + //algoritm's params float jli = params->colorappearance.jlight; float chr = params->colorappearance.chroma; @@ -527,9 +528,9 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh } } - // if (settings->viewinggreySc == 0) { //auto + // if (settings->viewinggreySc == 0) { //auto if (params->colorappearance.autoybscen && pwb == 2) {//auto - + if (mean < 15.f) { yb = 3.0; } else if (mean < 30.f) { @@ -554,8 +555,8 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh yb = 90.0; } } else { - yb = params->colorappearance.ybscen; - } + yb = params->colorappearance.ybscen; + } if (settings->viewinggreySc == 1) { yb = 18.0; @@ -571,7 +572,7 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw = 100.0 * Xw; yw = 100.0 * Yw; zw = 100.0 * Zw; - double xw1 =0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; + double xw1 = 0., yw1 = 0., zw1 = 0., xw2 = 0., yw2 = 0., zw2 = 0.; // settings of WB: scene and viewing if (params->colorappearance.wbmodel == "RawT") { @@ -581,21 +582,21 @@ void ImProcFunctions::ciecam_02 (CieImage* ncie, double adap, int begh, int endh xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - }else if(params->colorappearance.wbmodel == "free") { + } else if (params->colorappearance.wbmodel == "free") { xw1 = xws; // free temp and green yw1 = yws; zw1 = zws; xw2 = xwd; yw2 = ywd; - zw2 = zwd; - } + zw2 = zwd; + } double cz, wh, pfl; Ciecam02::initcam1 (gamu, yb, pilot, f, la, xw, yw, zw, n, d, nbb, ncb, cz, aw, wh, pfl, fl, c); @@ -1567,8 +1568,8 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int c = 0.41f; nc = 0.8f; } - - + + //viewing condition for surround if (params->colorappearance.surround == "Average") { f2 = 1.0f, c2 = 0.69f, nc2 = 1.0f; @@ -1585,14 +1586,15 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int c2 = 0.41f; nc2 = 0.8f; } -/* - //scene condition for surround - if (params->colorappearance.surrsource) { - f = 0.85f; // if user => source image has surround very dark - c = 0.55f; - nc = 0.85f; - } -*/ + + /* + //scene condition for surround + if (params->colorappearance.surrsource) { + f = 0.85f; // if user => source image has surround very dark + c = 0.55f; + nc = 0.85f; + } + */ //with which algorithm if (params->colorappearance.algo == "JC") { alg = 0; @@ -1609,12 +1611,12 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xwd = 100.f * Xwout; zwd = 100.f * Zwout; ywd = 100.f / params->colorappearance.greenout;//approximation to simplify - + xws = 100.f * Xwsc; zws = 100.f * Zwsc; yws = 100.f / params->colorappearance.greensc;//approximation to simplify - - + + /* //settings white point of output device - or illuminant viewing if (settings->viewingdevice == 0) { @@ -1691,7 +1693,7 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int const float degout = (params->colorappearance.degreeout) / 100.0f; const float pilotout = params->colorappearance.autodegreeout ? 2.0f : degout; - + //algoritm's params float chr = 0.f; @@ -1866,11 +1868,11 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int //evaluate lightness, contrast } - - - // if (settings->viewinggreySc == 0) { //auto - if (params->colorappearance.autoybscen && pwb == 2) {//auto - + + + // if (settings->viewinggreySc == 0) { //auto + if (params->colorappearance.autoybscen && pwb == 2) {//auto + if (mean < 15.f) { yb = 3.0f; } else if (mean < 30.f) { @@ -1894,8 +1896,9 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int } else { yb = 90.0f; } + // } else if (settings->viewinggreySc == 1) { - } else { + } else { yb = (float) params->colorappearance.ybscen; } @@ -1915,21 +1918,21 @@ void ImProcFunctions::ciecam_02float (CieImage* ncie, float adap, int begh, int xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "RawTCAT02") { + } else if (params->colorappearance.wbmodel == "RawTCAT02") { xw1 = xw; // Settings RT WB are used for CAT02 => mix , CAT02 is use for output device (screen: D50 D65, projector: lamp, LED) see preferences yw1 = yw; zw1 = zw; xw2 = xwd; yw2 = ywd; zw2 = zwd; - } else if(params->colorappearance.wbmodel == "free") { + } else if (params->colorappearance.wbmodel == "free") { xw1 = xws; // free temp and green yw1 = yws; zw1 = zws; xw2 = xwd; yw2 = ywd; - zw2 = zwd; - } + zw2 = zwd; + } float cz, wh, pfl; diff --git a/rtengine/improcfun.h b/rtengine/improcfun.h index d9cd17ef5..309e5c029 100644 --- a/rtengine/improcfun.h +++ b/rtengine/improcfun.h @@ -52,7 +52,7 @@ class ImProcFunctions double scale; bool multiThread; - void calcVignettingParams(int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); + void calcVignettingParams (int oW, int oH, const VignettingParams& vignetting, double &w2, double &h2, double& maxRadius, double &v, double &b, double &mul); void transformPreview (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int sx, int sy, int oW, int oH, int fW, int fH, const LCPMapper *pLCPMap); void transformLuminanceOnly (Imagefloat* original, Imagefloat* transformed, int cx, int cy, int oW, int oH, int fW, int fH); @@ -95,9 +95,9 @@ class ImProcFunctions rd = gd = bd = 0.0; for (int i = xs, ix = 0; i < xs + 4; i++, ix++) { - rd += src->r(k, i) * w[ix]; - gd += src->g(k, i) * w[ix]; - bd += src->b(k, i) * w[ix]; + rd += src->r (k, i) * w[ix]; + gd += src->g (k, i) * w[ix]; + bd += src->b (k, i) * w[ix]; } yr[kx] = rd; @@ -196,7 +196,7 @@ public: double lumimul[3]; ImProcFunctions (const ProcParams* iparams, bool imultiThread = true) - : monitorTransform(nullptr), lab2outputTransform(nullptr), output2monitorTransform(nullptr), params(iparams), scale(1), multiThread(imultiThread), lumimul{} {} + : monitorTransform (nullptr), lab2outputTransform (nullptr), output2monitorTransform (nullptr), params (iparams), scale (1), multiThread (imultiThread), lumimul{} {} ~ImProcFunctions (); void setScale (double iscale); @@ -207,10 +207,10 @@ public: void firstAnalysis (const Imagefloat* const working, const ProcParams ¶ms, LUTu & vhist16); void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, - SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, + SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, double expcomp, int hlcompr, int hlcomprthresh, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve); void labtoning (float r, float g, float b, float &ro, float &go, float &bo, int algm, int metchrom, int twoc, float satLimit, float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, LUTf & clToningcurve, LUTf & cl2Toningcurve, float iplow, float iphigh, double wp[3][3], double wip[3][3] ); @@ -245,9 +245,9 @@ public: void deconvsharpening (float** luminance, float** buffer, int W, int H, const SharpeningParams &sharpenParam); void MLsharpen (LabImage* lab);// Manuel's clarity / sharpening - void MLmicrocontrast(float** luminance, int W, int H ); //Manuel's microcontrast - void MLmicrocontrast(LabImage* lab ); //Manuel's microcontrast - void MLmicrocontrastcam(CieImage* ncie ); //Manuel's microcontrast + void MLmicrocontrast (float** luminance, int W, int H ); //Manuel's microcontrast + void MLmicrocontrast (LabImage* lab ); //Manuel's microcontrast + void MLmicrocontrastcam (CieImage* ncie ); //Manuel's microcontrast void impulsedenoise (LabImage* lab);//Emil's impulse denoise void impulsedenoisecam (CieImage* ncie, float **buffers[3]); @@ -258,13 +258,13 @@ public: void dirpyrequalizer (LabImage* lab, int scale);//Emil's wavelet - void EPDToneMapResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); - float *CompressDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); - void ContrastResid(float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); - float *ContrastDR(float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); + void EPDToneMapResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params& cp, int W_L, int H_L, float max0, float min0); + float *CompressDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Compressed); + void ContrastResid (float * WavCoeffs_L0, unsigned int Iterates, int skip, struct cont_params &cp, int W_L, int H_L, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx); + float *ContrastDR (float *Source, int skip, struct cont_params &cp, int W_L, int H_L, float Compression, float DetailBoost, float max0, float min0, float ave, float ah, float bh, float al, float bl, float factorx, float *Contrast = nullptr); - void EPDToneMap(LabImage *lab, unsigned int Iterates = 0, int skip = 1); - void EPDToneMapCIE(CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); + void EPDToneMap (LabImage *lab, unsigned int Iterates = 0, int skip = 1); + void EPDToneMapCIE (CieImage *ncie, float a_w, float c_, float w_h, int Wid, int Hei, int begh, int endh, float minQ, float maxQ, unsigned int Iterates = 0, int skip = 1); // pyramid denoise procparams::DirPyrDenoiseParams dnparams; @@ -274,58 +274,58 @@ public: int pitch, int scale, const int luma, const int chroma/*, LUTf & Lcurve, LUTf & abcurve*/ ); void Tile_calc (int tilesize, int overlap, int kall, int imwidth, int imheight, int &numtiles_W, int &numtiles_H, int &tilewidth, int &tileheight, int &tileWskip, int &tileHskip); - void ip_wavelet(LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, bool wavcontlutili, int skip); + void ip_wavelet (LabImage * lab, LabImage * dst, int kall, const procparams::WaveletParams & waparams, const WavCurve & wavCLVCcurve, const WavOpacityCurveRG & waOpacityCurveRG, const WavOpacityCurveBY & waOpacityCurveBY, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, LUTf &wavclCurve, bool wavcontlutili, int skip); - void WaveletcontAllL(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, - struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); - void WaveletcontAllLfinal(wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); - void WaveletcontAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW, - struct cont_params &cp, const bool useChannelA); - void WaveletAandBAllAB(LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, - struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili); + void WaveletcontAllL (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_L, + struct cont_params &cp, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, const WavOpacityCurveWL & waOpacityCurveWL, FlatCurve* ChCurve, bool Chutili); + void WaveletcontAllLfinal (wavelet_decomposition &WaveletCoeffs_L, struct cont_params &cp, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); + void WaveletcontAllAB (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, const WavOpacityCurveW & waOpacityCurveW, + struct cont_params &cp, const bool useChannelA); + void WaveletAandBAllAB (LabImage * lab, float **varhue, float **varchrom, wavelet_decomposition &WaveletCoeffs_a, wavelet_decomposition &WaveletCoeffs_b, + struct cont_params &cp, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* hhcurve, bool hhutili); void ContAllL (float **koeLi, float *maxkoeLi, bool lipschitz, int maxlvl, LabImage * lab, float **varhue, float **varchrom, float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, int W_L, int H_L, int skip, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, const WavCurve & wavCLVCcurve, const WavOpacityCurveW & waOpacityCurveW, FlatCurve* ChCurve, bool Chutili); void finalContAllL (float ** WavCoeffs_L, float * WavCoeffs_L0, int level, int dir, struct cont_params &cp, int W_L, int H_L, float *mean, float *sigma, float *MaxP, const WavOpacityCurveWL & waOpacityCurveWL); void ContAllAB (LabImage * lab, int maxlvl, float **varhue, float **varchrom, float ** WavCoeffs_a, float * WavCoeffs_a0, int level, int dir, const WavOpacityCurveW & waOpacityCurveW, struct cont_params &cp, int W_ab, int H_ab, const bool useChannelA); - void Evaluate2(wavelet_decomposition &WaveletCoeffs_L, - const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); + void Evaluate2 (wavelet_decomposition &WaveletCoeffs_L, + const struct cont_params& cp, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float madL[8][3]); void Eval2 (float ** WavCoeffs_L, int level, const struct cont_params& cp, int W_L, int H_L, int skip_L, int ind, float *mean, float *meanN, float *sigma, float *sigmaN, float *MaxP, float *MaxN, float *madL); - void Aver(float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); - void Sigma(float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); - void calckoe(float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); + void Aver (float * HH_Coeffs, int datalen, float &averagePlus, float &averageNeg, float &max, float &min); + void Sigma (float * HH_Coeffs, int datalen, float averagePlus, float averageNeg, float &sigmaPlus, float &sigmaNeg); + void calckoe (float ** WavCoeffs_LL, const struct cont_params& cp, float ** koeLi, int level, int dir, int W_L, int H_L, float edd, float *maxkoeLi, float **tmC = nullptr); - void Median_Denoise( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); - void RGB_denoise(int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve , const NoiseCurve & noiseCCurve , float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); - void RGB_denoise_infoGamCurve(const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); - void RGB_denoise_info(Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); + void Median_Denoise ( float **src, float **dst, int width, int height, Median medianType, int iterations, int numThreads, float **buffer = nullptr); + void RGB_denoise (int kall, Imagefloat * src, Imagefloat * dst, Imagefloat * calclum, float * ch_M, float *max_r, float *max_b, bool isRAW, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, const NoiseCurve & noiseLCurve, const NoiseCurve & noiseCCurve, float &chaut, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &nresi, float &highresi); + void RGB_denoise_infoGamCurve (const procparams::DirPyrDenoiseParams & dnparams, const bool isRAW, LUTf &gamcurve, float &gam, float &gamthresh, float &gamslope); + void RGB_denoise_info (Imagefloat * src, Imagefloat * provicalc, bool isRAW, LUTf &gamcurve, float gam, float gamthresh, float gamslope, const procparams::DirPyrDenoiseParams & dnparams, const double expcomp, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float & maxblueaut, float &minredaut, float & minblueaut, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, bool multiThread = false); void RGBtile_denoise (float * fLblox, int hblproc, float noisevar_Ldetail, float * nbrwt, float * blurbuffer ); //for DCT void RGBoutput_tile_row (float *bloxrow_L, float ** Ldetail, float ** tilemask_out, int height, int width, int top ); - bool WaveletDenoiseAllL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); - bool WaveletDenoiseAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void WaveletDenoiseAll_info(int levwav, wavelet_decomposition &WaveletCoeffs_a, - wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + bool WaveletDenoiseAllL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3], float * vari, int edge); + bool WaveletDenoiseAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void WaveletDenoiseAll_info (int levwav, wavelet_decomposition &WaveletCoeffs_a, + wavelet_decomposition &WaveletCoeffs_b, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float & minblueaut, int schoice, bool autoch, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - bool WaveletDenoiseAll_BiShrinkL(wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); - bool WaveletDenoiseAll_BiShrinkAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, - const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); - void ShrinkAllL(wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); - void ShrinkAllAB(wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, - float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); - void ShrinkAll_info(float ** WavCoeffs_a, float ** WavCoeffs_b, int level, - int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, - float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); - void Noise_residualAB(wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); + bool WaveletDenoiseAll_BiShrinkL (wavelet_decomposition &WaveletCoeffs_L, float *noisevarlum, float madL[8][3]); + bool WaveletDenoiseAll_BiShrinkAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float *noisevarchrom, float madL[8][3], float noisevar_ab, + const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb); + void ShrinkAllL (wavelet_decomposition &WaveletCoeffs_L, float **buffer, int level, int dir, float *noisevarlum, float * madL, float * vari, int edge); + void ShrinkAllAB (wavelet_decomposition &WaveletCoeffs_L, wavelet_decomposition &WaveletCoeffs_ab, float **buffer, int level, int dir, + float *noisevarchrom, float noisevar_ab, const bool useNoiseCCurve, bool autoch, bool denoiseMethodRgb, float * madL, float * madaab = nullptr, bool madCalculated = false); + void ShrinkAll_info (float ** WavCoeffs_a, float ** WavCoeffs_b, int level, + int W_ab, int H_ab, int skip_ab, float **noisevarlum, float **noisevarchrom, float **noisevarhue, int width, int height, float noisevar_abr, float noisevar_abb, LabImage * noi, float &chaut, int &Nb, float &redaut, float &blueaut, float &maxredaut, float &maxblueaut, float &minredaut, float &minblueaut, bool autoch, int schoice, int lvl, float &chromina, float &sigma, float &lumema, float &sigma_L, float &redyel, float &skinc, float &nsknc, + float &maxchred, float &maxchblue, float &minchred, float &minchblue, int &nb, float &chau, float &chred, float &chblue, bool denoiseMethodRgb, bool multiThread); + void Noise_residualAB (wavelet_decomposition &WaveletCoeffs_ab, float &chresid, float &chmaxresid, bool denoiseMethodRgb); void calcautodn_info (float &chaut, float &delta, int Nb, int levaut, float maxmax, float lumema, float chromina, int mode, int lissage, float redyel, float skinc, float nsknc); - float MadMax(float * DataList, int &max, int datalen); - float Mad(float * DataList, const int datalen); - float MadRgb(float * DataList, const int datalen); + float MadMax (float * DataList, int &max, int datalen); + float Mad (float * DataList, const int datalen); + float MadRgb (float * DataList, const int datalen); // pyramid wavelet void dirpyr_equalizer (float ** src, float ** dst, int srcwidth, int srcheight, float ** l_a, float ** l_b, float ** dest_a, float ** dest_b, const double * mult, const double dirpyrThreshold, const double skinprot, const bool gamutlab, float b_l, float t_l, float t_r, float b_r, int choice, int scale);//Emil's directional pyramid wavelet @@ -340,11 +340,11 @@ public: void PF_correct_RT (LabImage * src, LabImage * dst, double radius, int thresh); void PF_correct_RTcam (CieImage * src, CieImage * dst, double radius, int thresh); - void Badpixelscam(CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); - void BadpixelsLab(LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); + void Badpixelscam (CieImage * src, CieImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom, int hotbad); + void BadpixelsLab (LabImage * src, LabImage * dst, double radius, int thresh, int mode, float b_l, float t_l, float t_r, float b_r, float skinprot, float chrom); Image8* lab2rgb (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm); - Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga=nullptr); + Image16* lab2rgb16 (LabImage* lab, int cx, int cy, int cw, int ch, const procparams::ColorManagementParams &icm, bool bw, GammaValues *ga = nullptr); // CieImage *ciec; bool transCoord (int W, int H, int x, int y, int w, int h, int& xv, int& yv, int& wv, int& hv, double ascaleDef = -1, const LCPMapper *pLCPMap = nullptr); @@ -352,8 +352,8 @@ public: static void getAutoExp (const LUTu & histogram, int histcompr, double defgain, double clip, double& expcomp, int& bright, int& contr, int& black, int& hlcompr, int& hlcomprthresh); static double getAutoDistor (const Glib::ustring& fname, int thumb_size); double getTransformAutoFill (int oW, int oH, const LCPMapper *pLCPMap = nullptr); - void rgb2lab(const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); - void lab2rgb(const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); + void rgb2lab (const Imagefloat &src, LabImage &dst, const Glib::ustring &workingSpace); + void lab2rgb (const LabImage &src, Imagefloat &dst, const Glib::ustring &workingSpace); }; } #endif diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 6114dc1b5..e1a3002e2 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2106,7 +2106,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.autodegreeout) { keyFile.set_boolean ("Color appearance", "AutoDegreeout", colorappearance.autodegreeout); } - + if (!pedited || pedited->colorappearance.surround) { keyFile.set_string ("Color appearance", "Surround", colorappearance.surround); } @@ -2114,7 +2114,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.surrsrc) { keyFile.set_string ("Color appearance", "Surrsrc", colorappearance.surrsrc); } - + // if (!pedited || pedited->colorappearance.backgrd) keyFile.set_integer ("Color appearance", "Background", colorappearance.backgrd); if (!pedited || pedited->colorappearance.adaplum) { keyFile.set_double ("Color appearance", "AdaptLum", colorappearance.adaplum); @@ -2183,7 +2183,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.autoybscen) { keyFile.set_boolean ("Color appearance", "Autoybscen", colorappearance.autoybscen); } - + if (!pedited || pedited->colorappearance.surrsource) { keyFile.set_boolean ("Color appearance", "SurrSource", colorappearance.surrsource); } @@ -2207,7 +2207,7 @@ int ProcParams::save (const Glib::ustring &fname, const Glib::ustring &fname2, b if (!pedited || pedited->colorappearance.greensc) { keyFile.set_double ("Color appearance", "Greensc", colorappearance.greensc); } - + if (!pedited || pedited->colorappearance.ybout) { keyFile.set_integer ("Color appearance", "Ybout", colorappearance.ybout); } @@ -5021,7 +5021,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.autodegreeout = true; } } - + if (keyFile.has_key ("Color appearance", "Surround")) { colorappearance.surround = keyFile.get_string ("Color appearance", "Surround"); @@ -5037,7 +5037,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.surrsrc = true; } } - + // if (keyFile.has_key ("Color appearance", "Background")) {colorappearance.backgrd = keyFile.get_integer ("Color appearance", "Background"); if (pedited) pedited->colorappearance.backgrd = true; } if (keyFile.has_key ("Color appearance", "AdaptLum")) { colorappearance.adaplum = keyFile.get_double ("Color appearance", "AdaptLum"); @@ -5174,7 +5174,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.autoybscen = true; } } - + if (keyFile.has_key ("Color appearance", "SurrSource")) { colorappearance.surrsource = keyFile.get_boolean ("Color appearance", "SurrSource"); @@ -5222,7 +5222,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited) pedited->colorappearance.greensc = true; } } - + if (keyFile.has_key ("Color appearance", "Ybout")) { colorappearance.ybout = keyFile.get_integer ("Color appearance", "Ybout"); diff --git a/rtengine/rtengine.h b/rtengine/rtengine.h index cd4cd4942..9ba794a1f 100644 --- a/rtengine/rtengine.h +++ b/rtengine/rtengine.h @@ -276,7 +276,7 @@ public : virtual void autoCamChanged (double ccam, double ccamout) {} virtual void adapCamChanged (double cadap) {} virtual void ybCamChanged (int yb) {} - + }; class AutoChromaListener @@ -316,21 +316,21 @@ class AutoWBListener { public : virtual ~AutoWBListener() = default; - virtual void WBChanged(double temp, double green) = 0; + virtual void WBChanged (double temp, double green) = 0; }; class FrameCountListener { public : virtual ~FrameCountListener() = default; - virtual void FrameCountChanged(int n, int frameNum) = 0; + virtual void FrameCountChanged (int n, int frameNum) = 0; }; class ImageTypeListener { public : virtual ~ImageTypeListener() = default; - virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans) = 0; + virtual void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans) = 0; }; class WaveletListener @@ -388,7 +388,7 @@ public: virtual void endUpdateParams (ProcEvent change) = 0; virtual void endUpdateParams (int changeFlags) = 0; // Starts a minimal update - virtual void startProcessing(int changeCode) = 0; + virtual void startProcessing (int changeCode) = 0; /** Stops image processing. When it returns, the image processing is already stopped. */ virtual void stopProcessing () = 0; /** Sets the scale of the preview image. The larger the number is, the faster the image updates are (typical values are 4-5). @@ -481,7 +481,7 @@ public: * @param isRaw shall be true if it is a raw file * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast=false); + static ProcessingJob* create (const Glib::ustring& fname, bool isRaw, const procparams::ProcParams& pparams, bool fast = false); /** Creates a processing job from a file name. This function always succeeds. It only stores the data into the ProcessingJob class, it does not load * the image thus it returns immediately. This function increases the reference count of the initialImage. If you decide not the process the image you @@ -490,7 +490,7 @@ public: * @param initialImage is a loaded and pre-processed initial image * @param pparams is a struct containing the processing parameters * @return an object containing the data above. It can be passed to the functions that do the actual image processing. */ - static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast=false); + static ProcessingJob* create (InitialImage* initialImage, const procparams::ProcParams& pparams, bool fast = false); /** Cancels and destroys a processing job. The reference count of the corresponding initialImage (if any) is decreased. After the call of this function the ProcessingJob instance * gets invalid, you must not use it any more. Dont call this function while the job is being processed. @@ -519,7 +519,7 @@ public: * @param img is the result of the last ProcessingJob * @return the next ProcessingJob to process */ virtual ProcessingJob* imageReady (IImage16* img) = 0; - virtual void error(Glib::ustring message) = 0; + virtual void error (Glib::ustring message) = 0; }; /** This function performs all the image processinf steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately, * When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on diff --git a/rtengine/rtthumbnail.cc b/rtengine/rtthumbnail.cc index 4388b6184..511b17f9f 100644 --- a/rtengine/rtthumbnail.cc +++ b/rtengine/rtthumbnail.cc @@ -42,83 +42,91 @@ namespace { - bool checkRawImageThumb(const rtengine::RawImage& raw_image) - { - if (!raw_image.is_supportedThumb()) { - return false; - } - - const ssize_t length = - fdata(raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() - ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 - : raw_image.get_thumbLength(); - - return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +bool checkRawImageThumb (const rtengine::RawImage& raw_image) +{ + if (!raw_image.is_supportedThumb()) { + return false; } + const ssize_t length = + fdata (raw_image.get_thumbOffset(), raw_image.get_file())[1] != 0xD8 && raw_image.is_ppmThumb() + ? raw_image.get_thumbWidth() * raw_image.get_thumbHeight() * (raw_image.get_thumbBPS() / 8) * 3 + : raw_image.get_thumbLength(); -void scale_colors(rtengine::RawImage *ri, float scale_mul[4], float cblack[4]) + return raw_image.get_thumbOffset() + length <= raw_image.get_file()->size; +} + + +void scale_colors (rtengine::RawImage *ri, float scale_mul[4], float cblack[4]) { DCraw::dcrawImage_t image = ri->get_image(); - if(ri->isBayer()) { + + if (ri->isBayer()) { const int height = ri->get_iheight(); const int width = ri->get_iwidth(); - for(int row = 0; row < height; ++row) { - unsigned c0 = ri->FC(row,0); - unsigned c1 = ri->FC(row,1); + + for (int row = 0; row < height; ++row) { + unsigned c0 = ri->FC (row, 0); + unsigned c1 = ri->FC (row, 1); int col = 0; - for(; col < width - 1; col += 2) { + + for (; col < width - 1; col += 2) { float val0 = image[row * width + col][c0]; float val1 = image[row * width + col + 1][c1]; val0 -= cblack[c0]; val1 -= cblack[c1]; val0 *= scale_mul[c0]; val1 *= scale_mul[c1]; - image[row * width + col][c0] = rtengine::CLIP(val0); - image[row * width + col + 1][c1] = rtengine::CLIP(val1); + image[row * width + col][c0] = rtengine::CLIP (val0); + image[row * width + col + 1][c1] = rtengine::CLIP (val1); } - if(col < width) { // in case width is odd + + if (col < width) { // in case width is odd float val0 = image[row * width + col][c0]; val0 -= cblack[c0]; val0 *= scale_mul[c0]; - image[row * width + col][c0] = rtengine::CLIP(val0); + image[row * width + col][c0] = rtengine::CLIP (val0); } } - } else if(ri->isXtrans()) { + } else if (ri->isXtrans()) { const int height = ri->get_iheight(); const int width = ri->get_iwidth(); unsigned c[6]; - for(int row = 0; row < height; ++row) { - for(int i = 0; i < 6; ++i) { - c[i] = ri->XTRANSFC(row,i); + + for (int row = 0; row < height; ++row) { + for (int i = 0; i < 6; ++i) { + c[i] = ri->XTRANSFC (row, i); } int col = 0; - for(; col < width - 5; col += 6) { - for(int i = 0; i < 6; ++i) { + + for (; col < width - 5; col += 6) { + for (int i = 0; i < 6; ++i) { const unsigned ccol = c[i]; float val = image[row * width + col + i][ccol]; val -= cblack[ccol]; val *= scale_mul[ccol]; - image[row * width + col + i][ccol] = rtengine::CLIP(val); + image[row * width + col + i][ccol] = rtengine::CLIP (val); } } - for(; col < width; ++col) { // remaining columns - const unsigned ccol = ri->XTRANSFC(row,col); + + for (; col < width; ++col) { // remaining columns + const unsigned ccol = ri->XTRANSFC (row, col); float val = image[row * width + col][ccol]; val -= cblack[ccol]; val *= scale_mul[ccol]; - image[row * width + col][ccol] = rtengine::CLIP(val); + image[row * width + col][ccol] = rtengine::CLIP (val); } } } else { const int size = ri->get_iheight() * ri->get_iwidth(); + for (int i = 0; i < size; ++i) { for (int j = 0; j < 4; ++j) { float val = image[i][j]; val -= cblack[j]; val *= scale_mul[j]; - image[i][j] = rtengine::CLIP(val); + image[i][j] = rtengine::CLIP (val); } } } @@ -137,7 +145,7 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, StdImageSource imgSrc; - if (imgSrc.load(fname)) { + if (imgSrc.load (fname)) { return nullptr; } @@ -157,7 +165,7 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, tpp->defGain = 1.0; tpp->gammaCorrected = false; tpp->isRaw = 0; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; @@ -187,21 +195,21 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, // we want an Image8 if (img->getType() == rtengine::sImage8) { // copy the image - Image8 *srcImg = static_cast(img); + Image8 *srcImg = static_cast (img); Image8 *thImg = new Image8 (w, h); - srcImg->copyData(thImg); + srcImg->copyData (thImg); tpp->thumbImg = thImg; } else { // copy the image with a conversion - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, img); } } else { // we want the same image type than the source file - tpp->thumbImg = resizeToSameType(w, h, TI_Bilinear, img); + tpp->thumbImg = resizeToSameType (w, h, TI_Bilinear, img); // histogram computation tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); double avg_r = 0; double avg_g = 0; @@ -209,24 +217,24 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, int n = 0; if (img->getType() == rtengine::sImage8) { - Image8 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image8 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImage16) { - Image16 *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Image16 *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else if (img->getType() == sImagefloat) { - Imagefloat *image = static_cast(img); - image->computeHistogramAutoWB(avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); + Imagefloat *image = static_cast (img); + image->computeHistogramAutoWB (avg_r, avg_g, avg_b, n, tpp->aeHistogram, tpp->aeHistCompression); } else { - printf("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); + printf ("loadFromImage: Unsupported image type \"%s\"!\n", img->getType()); } if (n > 0) { ColorTemp cTemp; - tpp->redAWBMul = avg_r / double(n); - tpp->greenAWBMul = avg_g / double(n); - tpp->blueAWBMul = avg_b / double(n); + tpp->redAWBMul = avg_r / double (n); + tpp->greenAWBMul = avg_g / double (n); + tpp->blueAWBMul = avg_b / double (n); tpp->wbEqual = wbEq; tpp->wbTempBias = 0.0; @@ -241,11 +249,11 @@ Thumbnail* Thumbnail::loadFromImage (const Glib::ustring& fname, int &w, int &h, Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataLocation& rml, int &w, int &h, int fixwh, bool rotate, bool inspectorMode) { - RawImage *ri = new RawImage(fname); + RawImage *ri = new RawImage (fname); unsigned int imageNum = 0; - int r = ri->loadRaw(false, imageNum, false); + int r = ri->loadRaw (false, imageNum, false); - if( r ) { + if ( r ) { delete ri; return nullptr; } @@ -257,25 +265,25 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Image8* img = new Image8 (); // No sample format detection occurred earlier, so we set them here, // as they are mandatory for the setScanline method - img->setSampleFormat(IIOSF_UNSIGNED_CHAR); - img->setSampleArrangement(IIOSA_CHUNKY); + img->setSampleFormat (IIOSF_UNSIGNED_CHAR); + img->setSampleArrangement (IIOSA_CHUNKY); int err = 1; // See if it is something we support - if (checkRawImageThumb(*ri)) { - const char* data((const char*)fdata(ri->get_thumbOffset(), ri->get_file())); + if (checkRawImageThumb (*ri)) { + const char* data ((const char*)fdata (ri->get_thumbOffset(), ri->get_file())); if ( (unsigned char)data[1] == 0xd8 ) { - err = img->loadJPEGFromMemory(data, ri->get_thumbLength()); + err = img->loadJPEGFromMemory (data, ri->get_thumbLength()); } else if (ri->is_ppmThumb()) { - err = img->loadPPMFromMemory(data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); + err = img->loadPPMFromMemory (data, ri->get_thumbWidth(), ri->get_thumbHeight(), ri->get_thumbSwap(), ri->get_thumbBPS()); } } // did we succeed? if ( err ) { - printf("Could not extract thumb from %s\n", fname.data()); + printf ("Could not extract thumb from %s\n", fname.data()); delete img; delete ri; return nullptr; @@ -284,7 +292,7 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL Thumbnail* tpp = new Thumbnail (); tpp->isRaw = 1; - memset (tpp->colorMatrix, 0, sizeof(tpp->colorMatrix)); + memset (tpp->colorMatrix, 0, sizeof (tpp->colorMatrix)); tpp->colorMatrix[0][0] = 1.0; tpp->colorMatrix[1][1] = 1.0; tpp->colorMatrix[2][2] = 1.0; @@ -312,21 +320,21 @@ Thumbnail* Thumbnail::loadQuickFromRaw (const Glib::ustring& fname, RawMetaDataL if (inspectorMode) { tpp->thumbImg = img; } else { - tpp->thumbImg = resizeTo(w, h, TI_Nearest, img); + tpp->thumbImg = resizeTo (w, h, TI_Nearest, img); delete img; } if (rotate && ri->get_rotateDegree() > 0) { std::string fname = ri->get_filename(); - std::string suffix = fname.length() > 4 ? fname.substr(fname.length() - 3) : ""; + std::string suffix = fname.length() > 4 ? fname.substr (fname.length() - 3) : ""; for (unsigned int i = 0; i < suffix.length(); i++) { - suffix[i] = std::tolower(suffix[i]); + suffix[i] = std::tolower (suffix[i]); } // Leaf .mos, Mamiya .mef and Phase One .iiq files have thumbnails already rotated. if (suffix != "mos" && suffix != "mef" && suffix != "iiq") { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); // width/height may have changed after rotating w = tpp->thumbImg->getWidth(); h = tpp->thumbImg->getHeight(); @@ -356,12 +364,12 @@ RawMetaDataLocation Thumbnail::loadMetaDataFromRaw (const Glib::ustring& fname) rml.ciffBase = -1; rml.ciffLength = -1; - RawImage ri(fname); + RawImage ri (fname); unsigned int imageNum = 0; - int r = ri.loadRaw(false, imageNum); + int r = ri.loadRaw (false, imageNum); - if( !r ) { + if ( !r ) { rml.exifBase = ri.get_exifBase(); rml.ciffBase = ri.get_ciffBase(); rml.ciffLength = ri.get_ciffLen(); @@ -375,9 +383,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati RawImage *ri = new RawImage (fname); unsigned int tempImageNum = 0; - int r = ri->loadRaw(1, tempImageNum, 0); + int r = ri->loadRaw (1, tempImageNum, 0); - if( r ) { + if ( r ) { delete ri; return nullptr; } @@ -392,18 +400,18 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tpp->embProfileLength = ri->get_profileLen(); if (ri->get_profileLen()) - tpp->embProfile = cmsOpenProfileFromMem(ri->get_profile(), - ri->get_profileLen()); //\ TODO check if mutex is needed + tpp->embProfile = cmsOpenProfileFromMem (ri->get_profile(), + ri->get_profileLen()); //\ TODO check if mutex is needed - tpp->redMultiplier = ri->get_pre_mul(0); - tpp->greenMultiplier = ri->get_pre_mul(1); - tpp->blueMultiplier = ri->get_pre_mul(2); + tpp->redMultiplier = ri->get_pre_mul (0); + tpp->greenMultiplier = ri->get_pre_mul (1); + tpp->blueMultiplier = ri->get_pre_mul (2); //ri->scale_colors(); float pre_mul[4], scale_mul[4], cblack[4]; - ri->get_colorsCoeff(pre_mul, scale_mul, cblack, false); - scale_colors(ri, scale_mul, cblack); - + ri->get_colorsCoeff (pre_mul, scale_mul, cblack, false); + scale_colors (ri, scale_mul, cblack); + ri->pre_interpolate(); rml.exifBase = ri->get_exifBase(); @@ -414,7 +422,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati tpp->camwbGreen = tpp->greenMultiplier / pre_mul[1]; //ri->get_pre_mul(1); tpp->camwbBlue = tpp->blueMultiplier / pre_mul[2]; //ri->get_pre_mul(2); //tpp->defGain = 1.0 / min(ri->get_pre_mul(0), ri->get_pre_mul(1), ri->get_pre_mul(2)); - tpp->defGain = max(scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min(scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); + tpp->defGain = max (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]) / min (scale_mul[0], scale_mul[1], scale_mul[2], scale_mul[3]); tpp->gammaCorrected = true; @@ -422,8 +430,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int firstgreen = 1; // locate first green location in the first row - if(ri->getSensorType() == ST_BAYER) - while (!FISGREEN(filter, 1, firstgreen) && firstgreen < 3) { + if (ri->getSensorType() == ST_BAYER) + while (!FISGREEN (filter, 1, firstgreen) && firstgreen < 3) { firstgreen++; } @@ -431,9 +439,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { if (fixwh == 1) { // fix height, scale width - skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt(0.5) - firstgreen - 1) / h; + skip = ((ri->get_height() - ri->get_FujiWidth()) / sqrt (0.5) - firstgreen - 1) / h; } else { - skip = (ri->get_FujiWidth() / sqrt(0.5) - firstgreen - 1) / w; + skip = (ri->get_FujiWidth() / sqrt (0.5) - firstgreen - 1) / w; } } else { if (fixwh == 1) { // fix height, scale width @@ -453,7 +461,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int hskip = skip, vskip = skip; - if (!ri->get_model().compare("D1X")) { + if (!ri->get_model().compare ("D1X")) { hskip *= 2; } @@ -463,7 +471,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati DCraw::dcrawImage_t image = ri->get_image(); - Imagefloat* tmpImg = new Imagefloat(tmpw, tmph); + Imagefloat* tmpImg = new Imagefloat (tmpw, tmph); if (ri->getSensorType() == ST_BAYER) { // demosaicing! (sort of) @@ -475,7 +483,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int g = image[ofs][1]; int r, b; - if (FISRED(filter, row, col + 1)) { + if (FISRED (filter, row, col + 1)) { r = (image[ofs + 1 ][0] + image[ofs - 1 ][0]) >> 1; b = (image[ofs + width][2] + image[ofs - width][2]) >> 1; } else { @@ -483,9 +491,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati r = (image[ofs + width][0] + image[ofs - width][0]) >> 1; } - tmpImg->r(y, x) = r; - tmpImg->g(y, x) = g; - tmpImg->b(y, x) = b; + tmpImg->r (y, x) = r; + tmpImg->g (y, x) = g; + tmpImg->b (y, x) = b; } } } else if (ri->get_colors() == 1) { @@ -495,45 +503,45 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati for (int col = firstgreen, x = 0; col < width - 1 && x < tmpw; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = image[ofs][0]; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = image[ofs][0]; } } } else { - if(ri->getSensorType() == ST_FUJI_XTRANS) { - for( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { + if (ri->getSensorType() == ST_FUJI_XTRANS) { + for ( int row = 1, y = 0; row < height - 1 && y < tmph; row += vskip, y++) { rofs = row * width; - for( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { + for ( int col = 1, x = 0; col < width - 1 && x < tmpw; col += hskip, x++ ) { int ofs = rofs + col; float sum[3] = {}; int c; - for(int v = -1; v <= 1; v++) { - for(int h = -1; h <= 1; h++) { - c = ri->XTRANSFC(row + v, col + h); + for (int v = -1; v <= 1; v++) { + for (int h = -1; h <= 1; h++) { + c = ri->XTRANSFC (row + v, col + h); sum[c] += image[ofs + v * width + h][c]; } } - c = ri->XTRANSFC(row, col); + c = ri->XTRANSFC (row, col); switch (c) { case 0: - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = sum[2] / 3.f; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = sum[2] / 3.f; break; case 1: - tmpImg->r(y, x) = sum[0] / 2.f; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = sum[2] / 2.f; + tmpImg->r (y, x) = sum[0] / 2.f; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = sum[2] / 2.f; break; case 2: - tmpImg->r(y, x) = sum[0] / 3.f; - tmpImg->g(y, x) = sum[1] / 5.f; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = sum[0] / 3.f; + tmpImg->g (y, x) = sum[1] / 5.f; + tmpImg->b (y, x) = image[ofs][2]; break; } } @@ -546,29 +554,34 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati int top_margin = ri->get_topmargin(); int wmax = tmpw; int hmax = tmph; - if(ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing + + if (ri->get_maker() == "Sigma" && ri->DNGVERSION()) { // Hack to prevent sigma dng files from crashing wmax = (width - 2 - left_margin) / hskip; hmax = (height - 2 - top_margin) / vskip; } int y = 0; + for (int row = 1 + top_margin; row < iheight + top_margin - 1 && y < hmax; row += vskip, y++) { rofs = row * iwidth; int x = 0; + for (int col = firstgreen; col < iwidth + left_margin - 1 && x < wmax; col += hskip, x++) { int ofs = rofs + col; - tmpImg->r(y, x) = image[ofs][0]; - tmpImg->g(y, x) = image[ofs][1]; - tmpImg->b(y, x) = image[ofs][2]; + tmpImg->r (y, x) = image[ofs][0]; + tmpImg->g (y, x) = image[ofs][1]; + tmpImg->b (y, x) = image[ofs][2]; } + for (; x < tmpw; ++x) { - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = 0; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; } } + for (; y < tmph; ++y) { for (int x = 0; x < tmpw; ++x) { - tmpImg->r(y, x) = tmpImg->g(y, x) = tmpImg->b(y, x) = 0; + tmpImg->r (y, x) = tmpImg->g (y, x) = tmpImg->b (y, x) = 0; } } } @@ -576,10 +589,10 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth() / hskip; - double step = sqrt(0.5); + double step = sqrt (0.5); int wide = fw / step; int high = (tmph - fw) / step; - Imagefloat* fImg = new Imagefloat(wide, high); + Imagefloat* fImg = new Imagefloat (wide, high); float r, c; for (int row = 0; row < high; row++) @@ -593,9 +606,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double fr = r - ur; double fc = c - uc; - fImg->r(row, col) = (tmpImg->r(ur, uc) * (1 - fc) + tmpImg->r(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r(ur + 1, uc) * (1 - fc) + tmpImg->r(ur + 1, uc + 1) * fc) * fr; - fImg->g(row, col) = (tmpImg->g(ur, uc) * (1 - fc) + tmpImg->g(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g(ur + 1, uc) * (1 - fc) + tmpImg->g(ur + 1, uc + 1) * fc) * fr; - fImg->b(row, col) = (tmpImg->b(ur, uc) * (1 - fc) + tmpImg->b(ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b(ur + 1, uc) * (1 - fc) + tmpImg->b(ur + 1, uc + 1) * fc) * fr; + fImg->r (row, col) = (tmpImg->r (ur, uc) * (1 - fc) + tmpImg->r (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->r (ur + 1, uc) * (1 - fc) + tmpImg->r (ur + 1, uc + 1) * fc) * fr; + fImg->g (row, col) = (tmpImg->g (ur, uc) * (1 - fc) + tmpImg->g (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->g (ur + 1, uc) * (1 - fc) + tmpImg->g (ur + 1, uc + 1) * fc) * fr; + fImg->b (row, col) = (tmpImg->b (ur, uc) * (1 - fc) + tmpImg->b (ur, uc + 1) * fc) * (1 - fr) + (tmpImg->b (ur + 1, uc) * (1 - fc) + tmpImg->b (ur + 1, uc + 1) * fc) * fr; } delete tmpImg; @@ -612,7 +625,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati ); if (rotate_90) { - std::swap(tmpw, tmph); + std::swap (tmpw, tmph); } if (fixwh == 1) { // fix height, scale width @@ -626,10 +639,11 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati } if (rotate_90) { - tpp->thumbImg = resizeTo(h, w, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (h, w, TI_Bilinear, tmpImg); } else { - tpp->thumbImg = resizeTo(w, h, TI_Bilinear, tmpImg); + tpp->thumbImg = resizeTo (w, h, TI_Bilinear, tmpImg); } + delete tmpImg; @@ -641,7 +655,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati // generate histogram for auto exposure tpp->aeHistCompression = 3; - tpp->aeHistogram(65536 >> tpp->aeHistCompression); + tpp->aeHistogram (65536 >> tpp->aeHistCompression); tpp->aeHistogram.clear(); int radd = 4; int gadd = 4; @@ -656,8 +670,8 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 8; - end = min(height + width - fw - i, fw + i) - 8; + start = ABS (fw - i) + 8; + end = min (height + width - fw - i, fw + i) - 8; } else { start = 8; end = width - 8; @@ -665,33 +679,33 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_colors() == 1) { for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][0])) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][0])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_BAYER) { + } else if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) - if (FISGREEN(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (FISRED(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (FISBLUE(filter, i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (FISGREEN (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (FISRED (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (FISBLUE (filter, i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) - if (ri->ISXTRANSGREEN(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - } else if (ri->ISXTRANSRED(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; - } else if (ri->ISXTRANSBLUE(i, j)) { - tpp->aeHistogram[((int)(tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; + if (ri->ISXTRANSGREEN (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbGreen * image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + } else if (ri->ISXTRANSRED (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbRed * image[i * width + j][0])) >> tpp->aeHistCompression] += radd; + } else if (ri->ISXTRANSBLUE (i, j)) { + tpp->aeHistogram[ ((int) (tpp->camwbBlue * image[i * width + j][2])) >> tpp->aeHistCompression] += badd; } } else { /* if(ri->getSensorType()==ST_FOVEON) */ for (int j = start; j < end; j++) { - tpp->aeHistogram[((int)(image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; - tpp->aeHistogram[((int)(image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; - tpp->aeHistogram[((int)(image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; + tpp->aeHistogram[ ((int) (image[i * width + j][0] * 2.f)) >> tpp->aeHistCompression] += radd; + tpp->aeHistogram[ ((int) (image[i * width + j][1])) >> tpp->aeHistCompression] += gadd; + tpp->aeHistogram[ ((int) (image[i * width + j][2] * 0.5f)) >> tpp->aeHistCompression] += badd; } } } @@ -709,14 +723,14 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati if (ri->get_FujiWidth() != 0) { int fw = ri->get_FujiWidth(); - start = ABS(fw - i) + 32; - end = min(height + width - fw - i, fw + i) - 32; + start = ABS (fw - i) + 32; + end = min (height + width - fw - i, fw + i) - 32; } else { start = 32; end = width - 32; } - if(ri->getSensorType() == ST_BAYER) { + if (ri->getSensorType() == ST_BAYER) { for (int j = start; j < end; j++) { if (!filter) { double d = tpp->defGain * image[i * width + j][0]; @@ -731,7 +745,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati rn++; gn++; bn++; - } else if (FISGREEN(filter, i, j)) { + } else if (FISGREEN (filter, i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -740,7 +754,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (FISRED(filter, i, j)) { + } else if (FISRED (filter, i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -749,7 +763,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (FISBLUE(filter, i, j)) { + } else if (FISBLUE (filter, i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -760,9 +774,9 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati bn++; } } - } else if(ri->getSensorType() == ST_FUJI_XTRANS) { + } else if (ri->getSensorType() == ST_FUJI_XTRANS) { for (int j = start; j < end; j++) { - if (ri->ISXTRANSGREEN(i, j)) { + if (ri->ISXTRANSGREEN (i, j)) { double d = tpp->defGain * image[i * width + j][1]; if (d > 64000.) { @@ -771,7 +785,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_g += d; gn++; - } else if (ri->ISXTRANSRED(i, j)) { + } else if (ri->ISXTRANSRED (i, j)) { double d = tpp->defGain * image[i * width + j][0]; if (d > 64000.) { @@ -780,7 +794,7 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati avg_r += d; rn++; - } else if (ri->ISXTRANSBLUE(i, j)) { + } else if (ri->ISXTRANSBLUE (i, j)) { double d = tpp->defGain * image[i * width + j][2]; if (d > 64000.) { @@ -821,22 +835,22 @@ Thumbnail* Thumbnail::loadFromRaw (const Glib::ustring& fname, RawMetaDataLocati double greens = avg_g / gn * tpp->camwbGreen; double blues = avg_b / bn * tpp->camwbBlue; - tpp->redAWBMul = ri->get_rgb_cam(0, 0) * reds + ri->get_rgb_cam(0, 1) * greens + ri->get_rgb_cam(0, 2) * blues; - tpp->greenAWBMul = ri->get_rgb_cam(1, 0) * reds + ri->get_rgb_cam(1, 1) * greens + ri->get_rgb_cam(1, 2) * blues; - tpp->blueAWBMul = ri->get_rgb_cam(2, 0) * reds + ri->get_rgb_cam(2, 1) * greens + ri->get_rgb_cam(2, 2) * blues; + tpp->redAWBMul = ri->get_rgb_cam (0, 0) * reds + ri->get_rgb_cam (0, 1) * greens + ri->get_rgb_cam (0, 2) * blues; + tpp->greenAWBMul = ri->get_rgb_cam (1, 0) * reds + ri->get_rgb_cam (1, 1) * greens + ri->get_rgb_cam (1, 2) * blues; + tpp->blueAWBMul = ri->get_rgb_cam (2, 0) * reds + ri->get_rgb_cam (2, 1) * greens + ri->get_rgb_cam (2, 2) * blues; tpp->wbEqual = wbEq; tpp->wbTempBias = 0.0; ColorTemp cTemp; - cTemp.mul2temp(tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); + cTemp.mul2temp (tpp->redAWBMul, tpp->greenAWBMul, tpp->blueAWBMul, tpp->wbEqual, tpp->autoWBTemp, tpp->autoWBGreen); if (rotate && ri->get_rotateDegree() > 0) { - tpp->thumbImg->rotate(ri->get_rotateDegree()); + tpp->thumbImg->rotate (ri->get_rotateDegree()); } for (int a = 0; a < 3; a++) for (int b = 0; b < 3; b++) { - tpp->colorMatrix[a][b] = ri->get_rgb_cam(a, b); + tpp->colorMatrix[a][b] = ri->get_rgb_cam (a, b); } tpp->init(); @@ -851,7 +865,7 @@ void Thumbnail::init () { RawImageSource::inverse33 (colorMatrix, iColorMatrix); //colorMatrix is rgb_cam - memset (cam2xyz, 0, sizeof(cam2xyz)); + memset (cam2xyz, 0, sizeof (cam2xyz)); for (int i = 0; i < 3; i++) for (int j = 0; j < 3; j++) @@ -863,33 +877,33 @@ void Thumbnail::init () } Thumbnail::Thumbnail () : - camProfile(nullptr), + camProfile (nullptr), iColorMatrix{}, cam2xyz{}, - thumbImg(nullptr), - camwbRed(1.0), - camwbGreen(1.0), - camwbBlue(1.0), - redAWBMul(-1.0), - greenAWBMul(-1.0), - blueAWBMul(-1.0), - autoWBTemp(2700), - autoWBGreen(1.0), - wbEqual(-1.0), - wbTempBias(0.0), - aeHistCompression(3), - embProfileLength(0), - embProfileData(nullptr), - embProfile(nullptr), - redMultiplier(1.0), - greenMultiplier(1.0), - blueMultiplier(1.0), - scale(1.0), - defGain(1.0), - scaleForSave(8192), - gammaCorrected(false), + thumbImg (nullptr), + camwbRed (1.0), + camwbGreen (1.0), + camwbBlue (1.0), + redAWBMul (-1.0), + greenAWBMul (-1.0), + blueAWBMul (-1.0), + autoWBTemp (2700), + autoWBGreen (1.0), + wbEqual (-1.0), + wbTempBias (0.0), + aeHistCompression (3), + embProfileLength (0), + embProfileData (nullptr), + embProfile (nullptr), + redMultiplier (1.0), + greenMultiplier (1.0), + blueMultiplier (1.0), + scale (1.0), + defGain (1.0), + scaleForSave (8192), + gammaCorrected (false), colorMatrix{}, - isRaw(true) + isRaw (true) { } @@ -901,11 +915,11 @@ Thumbnail::~Thumbnail () delete [] embProfileData; if (embProfile) { - cmsCloseProfile(embProfile); + cmsCloseProfile (embProfile); } if (camProfile) { - cmsCloseProfile(camProfile); + cmsCloseProfile (camProfile); } } @@ -922,7 +936,7 @@ IImage8* Thumbnail::quickProcessImage (const procparams::ProcParams& params, int rwidth = thumbImg->getWidth() * rheight / thumbImg->getHeight(); } - Image8* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Image8* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); @@ -995,13 +1009,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { rwidth = rheight; - rheight = int(size_t(thumbImg->getHeight()) * size_t(rwidth) / size_t(thumbImg->getWidth())); + rheight = int (size_t (thumbImg->getHeight()) * size_t (rwidth) / size_t (thumbImg->getWidth())); } else { - rwidth = int(size_t(thumbImg->getWidth()) * size_t(rheight) / size_t(thumbImg->getHeight())); + rwidth = int (size_t (thumbImg->getWidth()) * size_t (rheight) / size_t (thumbImg->getHeight())); } - Imagefloat* baseImg = resizeTo(rwidth, rheight, interp, thumbImg); + Imagefloat* baseImg = resizeTo (rwidth, rheight, interp, thumbImg); if (params.coarse.rotate) { baseImg->rotate (params.coarse.rotate); @@ -1025,12 +1039,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei #endif for (int j = 0; j < rwidth; j++) { - float red = baseImg->r(i, j) * rmi; - baseImg->r(i, j) = CLIP(red); - float green = baseImg->g(i, j) * gmi; - baseImg->g(i, j) = CLIP(green); - float blue = baseImg->b(i, j) * bmi; - baseImg->b(i, j) = CLIP(blue); + float red = baseImg->r (i, j) * rmi; + baseImg->r (i, j) = CLIP (red); + float green = baseImg->g (i, j) * gmi; + baseImg->g (i, j) = CLIP (green); + float blue = baseImg->b (i, j) * bmi; + baseImg->b (i, j) = CLIP (blue); } } @@ -1051,7 +1065,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei //ColorTemp::CAT02 (baseImg, ¶ms) ;//perhaps not good! ImProcFunctions ipf (¶ms, false); - ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); + ipf.setScale (sqrt (double (fw * fw + fh * fh)) / sqrt (double (thumbImg->getWidth() * thumbImg->getWidth() + thumbImg->getHeight() * thumbImg->getHeight()))*scale); ipf.updateColorProfiles (ICCStore::getInstance()->getDefaultMonitorProfileName(), options.rtSettings.monitorIntent, false, false); LUTu hist16 (65536); @@ -1064,7 +1078,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei int origFW; int origFH; double tscale = 0.0; - getDimensions(origFW, origFH, tscale); + getDimensions (origFW, origFH, tscale); ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, origFW * tscale + 0.5, origFH * tscale + 0.5, focalLen, focalLen35mm, focusDist, fnumber, 0, true); // Raw rotate degree not detectable here delete baseImg; baseImg = trImg; @@ -1075,7 +1089,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (params.sh.enabled) { shmap = new SHMap (fw, fh, false); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { @@ -1104,7 +1118,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei LUTf satcurve (65536); LUTf lhskcurve (65536); - LUTf lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + LUTf lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation LUTf clcurve (65536); LUTf clToningcurve; LUTf cl2Toningcurve; @@ -1134,7 +1148,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei bool opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -1147,36 +1161,36 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); clToningcurve (65536); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, scale == 1 ? 1 : 16); cl2Toningcurve (65536); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, scale == 1 ? 1 : 16); } - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 16); } double rrm, ggm, bbm; float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation //printf("moy=%f ET=%f\n", moyS,eqty); float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -1193,15 +1207,15 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei if (isRaw) { cmsHPROFILE dummy; - RawImageSource::findInputProfile(params.icm.input, nullptr, camName, &dcpProf, dummy); + RawImageSource::findInputProfile (params.icm.input, nullptr, camName, &dcpProf, dummy); if (dcpProf) { - dcpProf->setStep2ApplyState(params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); + dcpProf->setStep2ApplyState (params.icm.working, params.icm.toneCurve, params.icm.applyLookTable, params.icm.applyBaselineExposureOffset, as); } } LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); // freeing up some memory customToneCurve1.Reset(); @@ -1216,12 +1230,12 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei } // luminance histogram update - if(params.labCurve.contrast != 0) { + if (params.labCurve.contrast != 0) { hist16.clear(); for (int i = 0; i < fh; i++) for (int j = 0; j < fw; j++) { - hist16[(int)((labView->L[i][j]))]++; + hist16[ (int) ((labView->L[i][j]))]++; } } @@ -1233,7 +1247,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei hist16, lumacurve, dummy, 16, utili); bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 16); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 16); bool autili, butili, ccutili, cclutili; CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, @@ -1241,13 +1255,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - ipf.vibrance(labView); + ipf.vibrance (labView); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { - ipf.EPDToneMap(labView, 5, 6); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || !params.colorappearance.enabled) { + ipf.EPDToneMap (labView, 5, 6); } - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { CurveFactory::curveLightBrightColor ( params.colorappearance.curve, params.colorappearance.curve2, @@ -1265,13 +1279,13 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float fiso = iso;// ISO float fspeed = shutter;//speed char * writ = new char[expcomp_.size() + 1];//convert expcomp_ to char - std::copy(expcomp_.begin(), expcomp_.end(), writ); + std::copy (expcomp_.begin(), expcomp_.end(), writ); writ[expcomp_.size()] = '\0'; - float fcomp = atof(writ); //compensation + - + float fcomp = atof (writ); //compensation + - delete[] writ; float adap; - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) //if no exif data or wrong { adap = 2000.f; @@ -1280,9 +1294,9 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei float expo2 = params.toneCurve.expcomp; // exposure compensation in tonecurve ==> direct EV E_V += expo2; float expo1;//exposure raw white point - expo1 = log2(params.raw.expos); //log2 ==>linear to EV + expo1 = log2 (params.raw.expos); //log2 ==>linear to EV E_V += expo1; - adap = powf(2.f, E_V - 3.f); //cd / m2 + adap = powf (2.f, E_V - 3.f); //cd / m2 //end calculation adaptation scene luminosity } @@ -1343,12 +1357,12 @@ int Thumbnail::getImageWidth (const procparams::ProcParams& params, int rheight, int rwidth; if (params.coarse.rotate == 90 || params.coarse.rotate == 270) { - ratio = (float)(thumbImg->getHeight()) / (float)(thumbImg->getWidth()); + ratio = (float) (thumbImg->getHeight()) / (float) (thumbImg->getWidth()); } else { - ratio = (float)(thumbImg->getWidth()) / (float)(thumbImg->getHeight()); + ratio = (float) (thumbImg->getWidth()) / (float) (thumbImg->getHeight()); } - rwidth = (int)(ratio * (float)rheight); + rwidth = (int) (ratio * (float)rheight); return rwidth; } @@ -1386,7 +1400,7 @@ void Thumbnail::getAutoWB (double& temp, double& green, double equal, double tem wbEqual = equal; wbTempBias = tempBias; // compute autoWBTemp and autoWBGreen - cTemp.mul2temp(redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); + cTemp.mul2temp (redAWBMul, greenAWBMul, blueAWBMul, wbEqual, autoWBTemp, autoWBGreen); autoWBTemp += autoWBTemp * tempBias; } @@ -1406,7 +1420,7 @@ void Thumbnail::applyAutoExp (procparams::ProcParams& params) if (params.toneCurve.autoexp && aeHistogram) { ImProcFunctions ipf (¶ms, false); - ipf.getAutoExp (aeHistogram, aeHistCompression, log(defGain) / log(2.0), params.toneCurve.clip, params.toneCurve.expcomp, + ipf.getAutoExp (aeHistogram, aeHistCompression, log (defGain) / log (2.0), params.toneCurve.clip, params.toneCurve.expcomp, params.toneCurve.brightness, params.toneCurve.contrast, params.toneCurve.black, params.toneCurve.hlcompr, params.toneCurve.hlcomprthresh); } } @@ -1430,11 +1444,11 @@ void Thumbnail::getSpotWB (const procparams::ProcParams& params, int xp, int yp, ImProcFunctions ipf (¶ms, false); ipf.transCoord (fw, fh, points, red, green, blue); - int tr = getCoarseBitMask(params.coarse); + int tr = getCoarseBitMask (params.coarse); // calculate spot wb (copy & pasted from stdimagesource) double reds = 0, greens = 0, blues = 0; int rn = 0, gn = 0, bn = 0; - thumbImg->getSpotWBData(reds, greens, blues, rn, gn, bn, red, green, blue, tr); + thumbImg->getSpotWBData (reds, greens, blues, rn, gn, bn, red, green, blue, tr); reds = reds / rn * camwbRed; greens = greens / gn * camwbGreen; blues = blues / bn * camwbBlue; @@ -1508,19 +1522,19 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Calc the histogram unsigned int* hist16 = new unsigned int [65536]; - memset(hist16, 0, sizeof(int) * 65536); + memset (hist16, 0, sizeof (int) * 65536); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image8 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Image16 *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->calcGrayscaleHist(hist16); + Imagefloat *image = static_cast (thumbImg); + image->calcGrayscaleHist (hist16); } else { - printf("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #1: Unsupported image type \"%s\"!\n", thumbImg->getType()); } // Go down till we cut off that many pixels @@ -1539,45 +1553,45 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) // Correction and gamma to 8 Bit if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); for (int i = 0; i < thumbImg->getHeight(); i++) for (int j = (thumbImg->getWidth() - trim_width) / 2; j < trim_width + (thumbImg->getWidth() - trim_width) / 2; j++) { unsigned short r_, g_, b_; - image->convertTo(image->r(i, j), r_); - image->convertTo(image->g(i, j), g_); - image->convertTo(image->b(i, j), b_); - int r = Color::gammatabThumb[min(r_, static_cast(max_)) * scaleForSave >> 13]; - int g = Color::gammatabThumb[min(g_, static_cast(max_)) * scaleForSave >> 13]; - int b = Color::gammatabThumb[min(b_, static_cast(max_)) * scaleForSave >> 13]; + image->convertTo (image->r (i, j), r_); + image->convertTo (image->g (i, j), g_); + image->convertTo (image->b (i, j), b_); + int r = Color::gammatabThumb[min (r_, static_cast (max_)) * scaleForSave >> 13]; + int g = Color::gammatabThumb[min (g_, static_cast (max_)) * scaleForSave >> 13]; + int b = Color::gammatabThumb[min (b_, static_cast (max_)) * scaleForSave >> 13]; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } @@ -1586,25 +1600,25 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) int max = 0; if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); + Image8 *image = static_cast (thumbImg); unsigned char max_ = 0; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1616,34 +1630,34 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); + Image16 *image = static_cast (thumbImg); unsigned short max_ = 0; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1655,34 +1669,34 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); + Imagefloat *image = static_cast (thumbImg); float max_ = 0.f; for (int row = 0; row < image->getHeight(); row++) for (int col = 0; col < image->getWidth(); col++) { - if (image->r(row, col) > max_) { - max_ = image->r(row, col); + if (image->r (row, col) > max_) { + max_ = image->r (row, col); } - if (image->g(row, col) > max_) { - max_ = image->g(row, col); + if (image->g (row, col) > max_) { + max_ = image->g (row, col); } - if (image->b(row, col) > max_) { - max_ = image->b(row, col); + if (image->b (row, col) > max_) { + max_ = image->b (row, col); } } - image->convertTo(max_, max); + image->convertTo (max_, max); if (max < 16384) { max = 16384; @@ -1694,16 +1708,16 @@ unsigned char* Thumbnail::getGrayscaleHistEQ (int trim_width) for (int i = 0; i < image->getHeight(); i++) for (int j = (image->getWidth() - trim_width) / 2; j < trim_width + (image->getWidth() - trim_width) / 2; j++) { unsigned short rtmp, gtmp, btmp; - image->convertTo(image->r(i, j), rtmp); - image->convertTo(image->g(i, j), gtmp); - image->convertTo(image->b(i, j), btmp); + image->convertTo (image->r (i, j), rtmp); + image->convertTo (image->g (i, j), gtmp); + image->convertTo (image->b (i, j), btmp); int r = rtmp * scaleForSave >> 21; int g = gtmp * scaleForSave >> 21; int b = btmp * scaleForSave >> 21; tmpdata[ix++] = (r * 19595 + g * 38469 + b * 7472) >> 16; } } else { - printf("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); + printf ("getGrayscaleHistEQ #2: Unsupported image type \"%s\"!\n", thumbImg->getType()); } } @@ -1750,22 +1764,22 @@ bool Thumbnail::writeImage (const Glib::ustring& fname, int format) return false; } - fwrite (thumbImg->getType(), sizeof (char), strlen(thumbImg->getType()), f); + fwrite (thumbImg->getType(), sizeof (char), strlen (thumbImg->getType()), f); fputc ('\n', f); - guint32 w = guint32(thumbImg->getWidth()); - guint32 h = guint32(thumbImg->getHeight()); + guint32 w = guint32 (thumbImg->getWidth()); + guint32 h = guint32 (thumbImg->getHeight()); fwrite (&w, sizeof (guint32), 1, f); fwrite (&h, sizeof (guint32), 1, f); if (thumbImg->getType() == sImage8) { - Image8 *image = static_cast(thumbImg); - image->writeData(f); + Image8 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImage16) { - Image16 *image = static_cast(thumbImg); - image->writeData(f); + Image16 *image = static_cast (thumbImg); + image->writeData (f); } else if (thumbImg->getType() == sImagefloat) { - Imagefloat *image = static_cast(thumbImg); - image->writeData(f); + Imagefloat *image = static_cast (thumbImg); + image->writeData (f); } //thumbImg->writeData(f); @@ -1794,8 +1808,8 @@ bool Thumbnail::readImage (const Glib::ustring& fname) } char imgType[31]; // 30 -> arbitrary size, but should be enough for all image type's name - fgets(imgType, 30, f); - imgType[strlen(imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char + fgets (imgType, 30, f); + imgType[strlen (imgType) - 1] = '\0'; // imgType has a \n trailing character, so we overwrite it by the \0 char guint32 width, height; fread (&width, 1, sizeof (guint32), f); @@ -1803,36 +1817,36 @@ bool Thumbnail::readImage (const Glib::ustring& fname) bool success = false; - if (!strcmp(imgType, sImage8)) { - Image8 *image = new Image8(width, height); - image->readData(f); + if (!strcmp (imgType, sImage8)) { + Image8 *image = new Image8 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImage16)) { - Image16 *image = new Image16(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImage16)) { + Image16 *image = new Image16 (width, height); + image->readData (f); thumbImg = image; success = true; - } else if (!strcmp(imgType, sImagefloat)) { - Imagefloat *image = new Imagefloat(width, height); - image->readData(f); + } else if (!strcmp (imgType, sImagefloat)) { + Imagefloat *image = new Imagefloat (width, height); + image->readData (f); thumbImg = image; success = true; } else { - printf("readImage: Unsupported image type \"%s\"!\n", imgType); + printf ("readImage: Unsupported image type \"%s\"!\n", imgType); } - fclose(f); + fclose (f); return success; } bool Thumbnail::readData (const Glib::ustring& fname) { - setlocale(LC_NUMERIC, "C"); // to set decimal point to "." + setlocale (LC_NUMERIC, "C"); // to set decimal point to "." Glib::KeyFile keyFile; try { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); try { keyFile.load_from_file (fname); @@ -1911,11 +1925,11 @@ bool Thumbnail::readData (const Glib::ustring& fname) return true; } catch (Glib::Error &err) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::readData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::readData / Unknown exception while trying to load \"%s\"!\n", fname.c_str()); } } @@ -1924,7 +1938,7 @@ bool Thumbnail::readData (const Glib::ustring& fname) bool Thumbnail::writeData (const Glib::ustring& fname) { - MyMutex::MyLock thmbLock(thumbMutex); + MyMutex::MyLock thmbLock (thumbMutex); Glib::ustring keyData; @@ -1957,11 +1971,11 @@ bool Thumbnail::writeData (const Glib::ustring& fname) } catch (Glib::Error& err) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); + printf ("Thumbnail::writeData / Error code %d while reading values from \"%s\":\n%s\n", err.code(), fname.c_str(), err.what().c_str()); } } catch (...) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); + printf ("Thumbnail::writeData / Unknown exception while trying to save \"%s\"!\n", fname.c_str()); } } @@ -1973,7 +1987,7 @@ bool Thumbnail::writeData (const Glib::ustring& fname) if (!f) { if (options.rtSettings.verbose) { - printf("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); + printf ("Thumbnail::writeData / Error: unable to open file \"%s\" with write access!\n", fname.c_str()); } return false; @@ -1993,18 +2007,22 @@ bool Thumbnail::readEmbProfile (const Glib::ustring& fname) embProfileLength = 0; FILE* f = g_fopen (fname.c_str (), "rb"); + if (f) { - if(!fseek (f, 0, SEEK_END)) { + if (!fseek (f, 0, SEEK_END)) { int profileLength = ftell (f); - if(profileLength > 0) { + + if (profileLength > 0) { embProfileLength = profileLength; - if(!fseek (f, 0, SEEK_SET)) { + + if (!fseek (f, 0, SEEK_SET)) { embProfileData = new unsigned char[embProfileLength]; fread (embProfileData, 1, embProfileLength, f); embProfile = cmsOpenProfileFromMem (embProfileData, embProfileLength); } } } + fclose (f); return embProfile != nullptr; } @@ -2016,7 +2034,7 @@ bool Thumbnail::writeEmbProfile (const Glib::ustring& fname) { if (embProfileData) { - FILE* f = g_fopen(fname.c_str (), "wb"); + FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { fwrite (embProfileData, 1, embProfileLength, f); @@ -2034,10 +2052,10 @@ bool Thumbnail::readAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "rb"); if (!f) { - aeHistogram(0); + aeHistogram (0); } else { - aeHistogram(65536 >> aeHistCompression); - fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + aeHistogram (65536 >> aeHistCompression); + fread (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -2052,7 +2070,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) FILE* f = g_fopen (fname.c_str (), "wb"); if (f) { - fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof(aeHistogram[0]), f); + fwrite (&aeHistogram[0], 1, (65536 >> aeHistCompression)*sizeof (aeHistogram[0]), f); fclose (f); return true; } @@ -2064,7 +2082,7 @@ bool Thumbnail::writeAEHistogram (const Glib::ustring& fname) unsigned char* Thumbnail::getImage8Data() { if (thumbImg && thumbImg->getType() == rtengine::sImage8) { - Image8* img8 = static_cast(thumbImg); + Image8* img8 = static_cast (thumbImg); return img8->data; } diff --git a/rtengine/simpleprocess.cc b/rtengine/simpleprocess.cc index 9d5daa936..14ad333e4 100644 --- a/rtengine/simpleprocess.cc +++ b/rtengine/simpleprocess.cc @@ -35,32 +35,34 @@ namespace rtengine { extern const Settings* settings; -namespace { +namespace +{ template -void adjust_radius(const T &default_param, double scale_factor, T ¶m) +void adjust_radius (const T &default_param, double scale_factor, T ¶m) { const double delta = (param - default_param) * scale_factor; param = default_param + delta; } -class ImageProcessor { +class ImageProcessor +{ public: - ImageProcessor(ProcessingJob* pjob, int& errorCode, - ProgressListener* pl, bool tunnelMetaData, bool flush): - job(static_cast(pjob)), - errorCode(errorCode), - pl(pl), - tunnelMetaData(tunnelMetaData), - flush(flush), + ImageProcessor (ProcessingJob* pjob, int& errorCode, + ProgressListener* pl, bool tunnelMetaData, bool flush): + job (static_cast (pjob)), + errorCode (errorCode), + pl (pl), + tunnelMetaData (tunnelMetaData), + flush (flush), // internal state - ipf_p(nullptr), - ii(nullptr), - imgsrc(nullptr), - fw(-1), - fh(-1), - pp(0, 0, 0, 0, 0) + ipf_p (nullptr), + ii (nullptr), + imgsrc (nullptr), + fw (-1), + fh (-1), + pp (0, 0, 0, 0, 0) { } @@ -79,6 +81,7 @@ private: if (!stage_init()) { return nullptr; } + stage_denoise(); stage_transform(); return stage_finish(); @@ -95,6 +98,7 @@ private: if (!stage_init()) { return nullptr; } + stage_transform(); stage_early_resize(); stage_denoise(); @@ -126,7 +130,7 @@ private: // acquire image from imagesource imgsrc = ii->getImageSource (); - tr = getCoarseBitMask(params.coarse); + tr = getCoarseBitMask (params.coarse); imgsrc->getFullSize (fw, fh, tr); // check the crop params @@ -161,18 +165,18 @@ private: // MyTime t1,t2; // t1.set(); - ipf_p.reset(new ImProcFunctions(¶ms, true)); - ImProcFunctions &ipf = *(ipf_p.get()); + ipf_p.reset (new ImProcFunctions (¶ms, true)); + ImProcFunctions &ipf = * (ipf_p.get()); - pp = PreviewProps(0, 0, fw, fh, 1); - imgsrc->setCurrentFrame(params.raw.bayersensor.imageNum); - imgsrc->preprocess( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); + pp = PreviewProps (0, 0, fw, fh, 1); + imgsrc->setCurrentFrame (params.raw.bayersensor.imageNum); + imgsrc->preprocess ( params.raw, params.lensProf, params.coarse, params.dirpyrDenoise.enabled); if (params.toneCurve.autoexp) {// this enabled HLRecovery - LUTu histRedRaw(256), histGreenRaw(256), histBlueRaw(256); - imgsrc->getRAWHistogram(histRedRaw, histGreenRaw, histBlueRaw); + LUTu histRedRaw (256), histGreenRaw (256), histBlueRaw (256); + imgsrc->getRAWHistogram (histRedRaw, histGreenRaw, histBlueRaw); - if (ToneCurveParams::HLReconstructionNecessary(histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { + if (ToneCurveParams::HLReconstructionNecessary (histRedRaw, histGreenRaw, histBlueRaw) && !params.toneCurve.hrenabled) { params.toneCurve.hrenabled = true; // WARNING: Highlight Reconstruction is being forced 'on', should we force a method here too? } @@ -182,13 +186,13 @@ private: pl->setProgress (0.20); } - imgsrc->demosaic( params.raw); + imgsrc->demosaic ( params.raw); if (pl) { pl->setProgress (0.30); } - if(params.retinex.enabled) { //enabled Retinex + if (params.retinex.enabled) { //enabled Retinex LUTf cdcurve (65536, 0); LUTf mapcurve (65536, 0); LUTu dummy; @@ -198,18 +202,18 @@ private: bool mapcontlutili = false; bool useHsl = false; // multi_array2D conversionBuffer(1, 1); - multi_array2D conversionBuffer(1, 1); - imgsrc->retinexPrepareBuffers(params.icm, params.retinex, conversionBuffer, dummy); - imgsrc->retinexPrepareCurves(params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); + multi_array2D conversionBuffer (1, 1); + imgsrc->retinexPrepareBuffers (params.icm, params.retinex, conversionBuffer, dummy); + imgsrc->retinexPrepareCurves (params.retinex, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, dehacontlutili, mapcontlutili, useHsl, dummy, dummy ); float minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax; - imgsrc->retinex( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); + imgsrc->retinex ( params.icm, params.retinex, params.toneCurve, cdcurve, mapcurve, dehatransmissionCurve, dehagaintransmissionCurve, conversionBuffer, dehacontlutili, mapcontlutili, useHsl, minCD, maxCD, mini, maxi, Tmean, Tsigma, Tmin, Tmax, dummy); } if (pl) { pl->setProgress (0.40); } - imgsrc->HLRecovery_Global( params.toneCurve ); + imgsrc->HLRecovery_Global ( params.toneCurve ); if (pl) { @@ -223,21 +227,21 @@ private: currWB = imgsrc->getWB (); } else if (params.wb.method == "Auto") { double rm, gm, bm; - imgsrc->getAutoWBMultipliers(rm, gm, bm); - currWB.update(rm, gm, bm, params.wb.equal, params.wb.tempBias); + imgsrc->getAutoWBMultipliers (rm, gm, bm); + currWB.update (rm, gm, bm, params.wb.equal, params.wb.tempBias); } calclum = nullptr ; - params.dirpyrDenoise.getCurves(noiseLCurve, noiseCCurve); + params.dirpyrDenoise.getCurves (noiseLCurve, noiseCCurve); autoNR = (float) settings->nrauto;// autoNRmax = (float) settings->nrautomax;// - if(settings->leveldnti == 0) { + if (settings->leveldnti == 0) { tilesize = 1024; overlap = 128; } - if(settings->leveldnti == 1) { + if (settings->leveldnti == 1) { tilesize = 768; overlap = 96; } @@ -248,7 +252,7 @@ private: ipf.Tile_calc (tilesize, overlap, 2, fw, fh, numtiles_W, numtiles_H, tilewidth, tileheight, tileWskip, tileHskip); int nbtl = numtiles_W * numtiles_H; - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { nbtl = 9; } @@ -264,24 +268,24 @@ private: pcsk = new float [nbtl]; // printf("expert=%d\n",settings->leveldnautsimpl); - if(settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { + if (settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "PON") { MyTime t1pone, t2pone; t1pone.set(); int crW = 100; // settings->leveldnv == 0 int crH = 100; // settings->leveldnv == 0 - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -289,7 +293,7 @@ private: float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } @@ -298,35 +302,35 @@ private: // Imagefloat *origCropPart;//init auto noise // origCropPart = new Imagefloat (crW, crH);//allocate memory if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); -#pragma omp parallel + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + #pragma omp parallel { Imagefloat *origCropPart;//init auto noise origCropPart = new Imagefloat (crW, crH);//allocate memory Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves int skipP = 1; -#pragma omp for schedule(dynamic) collapse(2) nowait + #pragma omp for schedule(dynamic) collapse(2) nowait - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { int beg_tileW = wcr * tileWskip + tileWskip / 2.f - crW / 2.f; int beg_tileH = hcr * tileHskip + tileHskip / 2.f - crH / 2.f; - PreviewProps ppP (beg_tileW , beg_tileH, crW, crH, skipP); + PreviewProps ppP (beg_tileW, beg_tileH, crW, crH, skipP); imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw ); //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve float maxr = 0.f; float maxb = 0.f; float pondcorrec = 1.0f; @@ -339,7 +343,7 @@ private: maxblueaut = 0.f; chromina = 0.f; sigma = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, Nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); float multip = 1.f; float adjustr = 1.f; @@ -361,27 +365,27 @@ private: adjustr = 1.f / 1.2f; } - if(!imgsrc->isRAW()) { + if (!imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } - float maxmax = max(maxredaut, maxblueaut); + float maxmax = max (maxredaut, maxblueaut); float delta; int mode = 2; int lissage = settings->leveldnliss; ipf.calcautodn_info (chaut, delta, Nb, levaut, maxmax, lumema, chromina, mode, lissage, redyel, skinc, nsknc); // printf("PROCESS cha=%f red=%f bl=%f redM=%f bluM=%f chrom=%f sigm=%f lum=%f sigL=%f\n",chaut,redaut,blueaut, maxredaut, maxblueaut, chromina, sigma, lumema, sigma_L); - if(maxredaut > maxblueaut) { + if (maxredaut > maxblueaut) { maxr = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minblueaut <= minredaut && minblueaut < chaut) { + if (minblueaut <= minredaut && minblueaut < chaut) { maxb = (-chaut + minblueaut) / (autoNRmax * multip * adjustr * lowdenoise); } } else { maxb = (delta) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - if(minredaut <= minblueaut && minredaut < chaut) { + if (minredaut <= minblueaut && minredaut < chaut) { maxr = (-chaut + minredaut) / (autoNRmax * multip * adjustr * lowdenoise); } }//maxb mxr - empirical evaluation red / blue @@ -404,45 +408,45 @@ private: int liss = settings->leveldnliss; //smooth result around mean - if(liss == 2 || liss == 3) { + if (liss == 2 || liss == 3) { // I smooth only mean and not delta (max) float nchm = 0.f; float koef = 0.4f; //between 0.1 to 0.9 - if(liss == 3) { + if (liss == 3) { koef = 0.0f; //quasi auto for mean Ch } - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { nchm += ch_M[hcr * numtiles_W + wcr]; } } nchm /= (numtiles_H * numtiles_W); - for(int wcr = 0; wcr < numtiles_W; wcr++) { - for(int hcr = 0; hcr < numtiles_H; hcr++) { + for (int wcr = 0; wcr < numtiles_W; wcr++) { + for (int hcr = 0; hcr < numtiles_H; hcr++) { ch_M[hcr * numtiles_W + wcr] = nchm + (ch_M[hcr * numtiles_W + wcr] - nchm) * koef; } } } - if(liss == 3) { //same as auto but with much cells + if (liss == 3) { //same as auto but with much cells float MaxR = 0.f; float MaxB = 0.f; float MaxRMoy = 0.f; float MaxBMoy = 0.f; - for(int k = 0; k < nbtl; k++) { + for (int k = 0; k < nbtl; k++) { MaxBMoy += max_b[k]; MaxRMoy += max_r[k]; - if(max_r[k] > MaxR) { + if (max_r[k] > MaxR) { MaxR = max_r[k]; } - if(max_b[k] > MaxB) { + if (max_b[k] > MaxB) { MaxB = max_b[k]; } @@ -451,8 +455,8 @@ private: MaxBMoy /= nbtl; MaxRMoy /= nbtl; - for(int k = 0; k < nbtl; k++) { - if(MaxR > MaxB) { + for (int k = 0; k < nbtl; k++) { + if (MaxR > MaxB) { max_r[k] = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev //max_b[k]=MinB; max_b[k] = MaxBMoy + (MaxB - MaxBMoy) * 0.66f; @@ -468,35 +472,35 @@ private: if (settings->verbose) { t2pone.set(); - printf("Info denoise ponderated performed in %d usec:\n", t2pone.etime(t1pone)); + printf ("Info denoise ponderated performed in %d usec:\n", t2pone.etime (t1pone)); } } } - if((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { + if ((settings->leveldnautsimpl == 1 && params.dirpyrDenoise.Cmethod == "AUT") || (settings->leveldnautsimpl == 0 && params.dirpyrDenoise.C2method == "AUTO")) { MyTime t1aue, t2aue; t1aue.set(); int crW, crH; - if(settings->leveldnv == 0) { + if (settings->leveldnv == 0) { crW = 100; crH = 100; } - if(settings->leveldnv == 1) { + if (settings->leveldnv == 1) { crW = 250; crH = 250; } - if(settings->leveldnv == 2) { - crW = int(tileWskip / 2); - crH = int(tileHskip / 2); + if (settings->leveldnv == 2) { + crW = int (tileWskip / 2); + crH = int (tileHskip / 2); } // if(settings->leveldnv ==2) {crW=int(tileWskip/2);crH=int(1.15f*(tileWskip/2));}//adapted to scale of preview - if(settings->leveldnv == 3) { + if (settings->leveldnv == 3) { crW = tileWskip - 10; crH = tileHskip - 10; } @@ -504,14 +508,14 @@ private: float lowdenoise = 1.f; int levaut = settings->leveldnaut; - if(levaut == 1) { //Standard + if (levaut == 1) { //Standard lowdenoise = 0.7f; } if (params.dirpyrDenoise.enabled) {//evaluate Noise - LUTf gamcurve(65536, 0); + LUTf gamcurve (65536, 0); float gam, gamthresh, gamslope; - ipf.RGB_denoise_infoGamCurve(params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); + ipf.RGB_denoise_infoGamCurve (params.dirpyrDenoise, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope); int Nb[9]; int coordW[3];//coordonate of part of image to mesure noise int coordH[3]; @@ -523,34 +527,34 @@ private: coordH[0] = begH; coordH[1] = fh / 2 - crH / 2; coordH[2] = fh - crH - begH; -#pragma omp parallel + #pragma omp parallel { Imagefloat *origCropPart;//init auto noise origCropPart = new Imagefloat (crW, crH);//allocate memory Imagefloat *provicalc = new Imagefloat ((crW + 1) / 2, (crH + 1) / 2); //for denoise curves -#pragma omp for schedule(dynamic) collapse(2) nowait + #pragma omp for schedule(dynamic) collapse(2) nowait - for(int wcr = 0; wcr <= 2; wcr++) { - for(int hcr = 0; hcr <= 2; hcr++) { - PreviewProps ppP (coordW[wcr] , coordH[hcr], crW, crH, 1); + for (int wcr = 0; wcr <= 2; wcr++) { + for (int hcr = 0; hcr <= 2; hcr++) { + PreviewProps ppP (coordW[wcr], coordH[hcr], crW, crH, 1); imgsrc->getImage (currWB, tr, origCropPart, ppP, params.toneCurve, params.icm, params.raw); //baseImg->getStdImage(currWB, tr, origCropPart, ppP, true, params.toneCurve); // we only need image reduced to 1/4 here - for(int ii = 0; ii < crH; ii += 2) { - for(int jj = 0; jj < crW; jj += 2) { - provicalc->r(ii >> 1, jj >> 1) = origCropPart->r(ii, jj); - provicalc->g(ii >> 1, jj >> 1) = origCropPart->g(ii, jj); - provicalc->b(ii >> 1, jj >> 1) = origCropPart->b(ii, jj); + for (int ii = 0; ii < crH; ii += 2) { + for (int jj = 0; jj < crW; jj += 2) { + provicalc->r (ii >> 1, jj >> 1) = origCropPart->r (ii, jj); + provicalc->g (ii >> 1, jj >> 1) = origCropPart->g (ii, jj); + provicalc->b (ii >> 1, jj >> 1) = origCropPart->b (ii, jj); } } - imgsrc->convertColorSpace(provicalc, params.icm, currWB);//for denoise luminance curve + imgsrc->convertColorSpace (provicalc, params.icm, currWB); //for denoise luminance curve int nb = 0; float chaut = 0.f, redaut = 0.f, blueaut = 0.f, maxredaut = 0.f, maxblueaut = 0.f, minredaut = 0.f, minblueaut = 0.f, chromina = 0.f, sigma = 0.f, lumema = 0.f, sigma_L = 0.f, redyel = 0.f, skinc = 0.f, nsknc = 0.f; - ipf.RGB_denoise_info(origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); + ipf.RGB_denoise_info (origCropPart, provicalc, imgsrc->isRAW(), gamcurve, gam, gamthresh, gamslope, params.dirpyrDenoise, imgsrc->getDirPyrDenoiseExpComp(), chaut, nb, redaut, blueaut, maxredaut, maxblueaut, minredaut, minblueaut, chromina, sigma, lumema, sigma_L, redyel, skinc, nsknc); Nb[hcr * 3 + wcr] = nb; ch_M[hcr * 3 + wcr] = chaut; max_r[hcr * 3 + wcr] = maxredaut; @@ -604,7 +608,7 @@ private: adjustr = 1.f / 1.2f; } - if(!imgsrc->isRAW()) { + if (!imgsrc->isRAW()) { multip = 2.f; //take into account gamma for TIF / JPG approximate value...not good fot gamma=1 } @@ -612,17 +616,17 @@ private: int mode = 1; int lissage = settings->leveldnliss; - for(int k = 0; k < 9; k++) { - float maxmax = max(max_r[k], max_b[k]); + for (int k = 0; k < 9; k++) { + float maxmax = max (max_r[k], max_b[k]); ipf.calcautodn_info (ch_M[k], delta[k], Nb[k], levaut, maxmax, lumL[k], chromC[k], mode, lissage, ry[k], sk[k], pcsk[k] ); // printf("ch_M=%f delta=%f\n",ch_M[k], delta[k]); } - for(int k = 0; k < 9; k++) { - if(max_r[k] > max_b[k]) { + for (int k = 0; k < 9; k++) { + if (max_r[k] > max_b[k]) { //printf("R delta=%f koef=%f\n",delta[k],autoNRmax*multip*adjustr*lowdenoise); Max_R[k] = (delta[k]) / ((autoNRmax * multip * adjustr * lowdenoise) / 2.f); - Min_B[k] = -(ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); + Min_B[k] = - (ch_M[k] - min_b[k]) / (autoNRmax * multip * adjustr * lowdenoise); Max_B[k] = 0.f; Min_R[k] = 0.f; } else { @@ -634,7 +638,7 @@ private: } } - for(int k = 0; k < 9; k++) { + for (int k = 0; k < 9; k++) { // printf("ch_M= %f Max_R=%f Max_B=%f min_r=%f min_b=%f\n",ch_M[k],Max_R[k], Max_B[k],Min_R[k], Min_B[k]); chM += ch_M[k]; MaxBMoy += Max_B[k]; @@ -642,19 +646,19 @@ private: MinRMoy += Min_R[k]; MinBMoy += Min_B[k]; - if(Max_R[k] > MaxR) { + if (Max_R[k] > MaxR) { MaxR = Max_R[k]; } - if(Max_B[k] > MaxB) { + if (Max_B[k] > MaxB) { MaxB = Max_B[k]; } - if(Min_R[k] < MinR) { + if (Min_R[k] < MinR) { MinR = Min_R[k]; } - if(Min_B[k] < MinB) { + if (Min_B[k] < MinB) { MinB = Min_B[k]; } @@ -666,7 +670,7 @@ private: MinBMoy /= 9; MinRMoy /= 9; - if(MaxR > MaxB) { + if (MaxR > MaxB) { maxr = MaxRMoy + (MaxR - MaxRMoy) * 0.66f; //#std Dev // maxb=MinB; maxb = MinBMoy + (MinB - MinBMoy) * 0.66f; @@ -687,7 +691,7 @@ private: if (settings->verbose) { t2aue.set(); - printf("Info denoise auto performed in %d usec:\n", t2aue.etime(t1aue)); + printf ("Info denoise auto performed in %d usec:\n", t2aue.etime (t1aue)); } //end evaluate noise @@ -720,7 +724,7 @@ private: // at this stage, we can flush the raw data to free up quite an important amount of memory // commented out because it makes the application crash when batch processing... // TODO: find a better place to flush rawData and rawRGB - if(flush) { + if (flush) { imgsrc->flushRawData(); imgsrc->flushRGB(); } @@ -732,7 +736,7 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); // perform luma/chroma denoise // CieImage *cieView; @@ -744,30 +748,30 @@ private: DirPyrDenoiseParams denoiseParams = params.dirpyrDenoise; // make a copy because we cheat here - if(denoiseParams.Lmethod == "CUR") { - if(noiseLCurve) { + if (denoiseParams.Lmethod == "CUR") { + if (noiseLCurve) { denoiseParams.luma = 0.5f; } else { denoiseParams.luma = 0.0f; } - } else if(denoiseParams.Lmethod == "SLI") { + } else if (denoiseParams.Lmethod == "SLI") { noiseLCurve.Reset(); } if (denoiseParams.enabled && (noiseLCurve || noiseCCurve )) { // we only need image reduced to 1/4 here calclum = new Imagefloat ((fw + 1) / 2, (fh + 1) / 2); //for luminance denoise curve -#pragma omp parallel for + #pragma omp parallel for - for(int ii = 0; ii < fh; ii += 2) { - for(int jj = 0; jj < fw; jj += 2) { - calclum->r(ii >> 1, jj >> 1) = baseImg->r(ii, jj); - calclum->g(ii >> 1, jj >> 1) = baseImg->g(ii, jj); - calclum->b(ii >> 1, jj >> 1) = baseImg->b(ii, jj); + for (int ii = 0; ii < fh; ii += 2) { + for (int jj = 0; jj < fw; jj += 2) { + calclum->r (ii >> 1, jj >> 1) = baseImg->r (ii, jj); + calclum->g (ii >> 1, jj >> 1) = baseImg->g (ii, jj); + calclum->b (ii >> 1, jj >> 1) = baseImg->b (ii, jj); } } - imgsrc->convertColorSpace(calclum, params.icm, currWB); + imgsrc->convertColorSpace (calclum, params.icm, currWB); } if (denoiseParams.enabled) { @@ -776,7 +780,7 @@ private: // ipf.RGB_denoise(baseImg, baseImg, calclum, imgsrc->isRAW(), denoiseParams, params.defringe, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, lldenoiseutili); float chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi; int kall = 2; - ipf.RGB_denoise(kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); + ipf.RGB_denoise (kall, baseImg, baseImg, calclum, ch_M, max_r, max_b, imgsrc->isRAW(), denoiseParams, imgsrc->getDirPyrDenoiseExpComp(), noiseLCurve, noiseCCurve, chaut, redaut, blueaut, maxredaut, maxblueaut, nresi, highresi); } @@ -797,9 +801,9 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); - imgsrc->convertColorSpace(baseImg, params.icm, currWB); + imgsrc->convertColorSpace (baseImg, params.icm, currWB); // perform first analysis hist16 (65536); @@ -822,15 +826,15 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); if (params.dirpyrequalizer.cbdlMethod == "bef" && params.dirpyrequalizer.enabled && !params.colorappearance.enabled) { const int W = baseImg->getWidth(); const int H = baseImg->getHeight(); - LabImage labcbdl(W, H); - ipf.rgb2lab(*baseImg, labcbdl, params.icm.working); + LabImage labcbdl (W, H); + ipf.rgb2lab (*baseImg, labcbdl, params.icm.working); ipf.dirpyrequalizer (&labcbdl, 1); - ipf.lab2rgb(labcbdl, *baseImg, params.icm.working); + ipf.lab2rgb (labcbdl, *baseImg, params.icm.working); } // update blurmap @@ -838,7 +842,7 @@ private: if (params.sh.enabled) { shmap = new SHMap (fw, fh, true); - double radius = sqrt (double(fw * fw + fh * fh)) / 2.0; + double radius = sqrt (double (fw * fw + fh * fh)) / 2.0; double shradius = params.sh.radius; if (!params.sh.hq) { @@ -850,14 +854,14 @@ private: // RGB processing - curve1(65536); - curve2(65536); - curve(65536, 0); - satcurve(65536, 0); - lhskcurve(65536, 0); - lumacurve(32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation - clcurve(65536, 0); - wavclCurve(65536, 0); + curve1 (65536); + curve2 (65536); + curve (65536, 0); + satcurve (65536, 0); + lhskcurve (65536, 0); + lumacurve (32770, 0); // lumacurve[32768] and lumacurve[32769] will be set to 32768 and 32769 later to allow linear interpolation + clcurve (65536, 0); + wavclCurve (65536, 0); //if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; @@ -871,7 +875,7 @@ private: bool opautili = false; - if(params.colorToning.enabled) { + if (params.colorToning.enabled) { TMatrix wprof = ICCStore::getInstance()->workingSpaceMatrix (params.icm.working); double wp[3][3] = { {wprof[0][0], wprof[0][1], wprof[0][2]}, @@ -884,35 +888,35 @@ private: {wiprof[1][0], wiprof[1][1], wiprof[1][2]}, {wiprof[2][0], wiprof[2][1], wiprof[2][2]} }; - params.colorToning.getCurves(ctColorCurve, ctOpacityCurve, wp, wip, opautili); + params.colorToning.getCurves (ctColorCurve, ctOpacityCurve, wp, wip, opautili); clToningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.clcurve, clToningcurve, 1); + CurveFactory::curveToning (params.colorToning.clcurve, clToningcurve, 1); cl2Toningcurve (65536, 0); - CurveFactory::curveToning(params.colorToning.cl2curve, cl2Toningcurve, 1); + CurveFactory::curveToning (params.colorToning.cl2curve, cl2Toningcurve, 1); } labView = new LabImage (fw, fh); - if(params.blackwhite.enabled) { + if (params.blackwhite.enabled) { CurveFactory::curveBW (params.blackwhite.beforeCurve, params.blackwhite.afterCurve, hist16, dummy, customToneCurvebw1, customToneCurvebw2, 1); } double rrm, ggm, bbm; float autor, autog, autob; - float satLimit = float(params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; - float satLimitOpacity = 1.f - (float(params.colorToning.saturatedOpacity) / 100.f); + float satLimit = float (params.colorToning.satProtectionThreshold) / 100.f * 0.7f + 0.3f; + float satLimitOpacity = 1.f - (float (params.colorToning.saturatedOpacity) / 100.f); - if(params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings + if (params.colorToning.enabled && params.colorToning.autosat) { //for colortoning evaluation of saturation settings float moyS = 0.f; float eqty = 0.f; ipf.moyeqt (baseImg, moyS, eqty);//return image : mean saturation and standard dev of saturation float satp = ((moyS + 1.5f * eqty) - 0.3f) / 0.7f; //1.5 sigma ==> 93% pixels with high saturation -0.3 / 0.7 convert to Hombre scale - if(satp >= 0.92f) { + if (satp >= 0.92f) { satp = 0.92f; //avoid values too high (out of gamut) } - if(satp <= 0.15f) { + if (satp <= 0.15f) { satp = 0.15f; //avoid too low values } @@ -923,14 +927,14 @@ private: autor = -9000.f; // This will ask to compute the "auto" values for the B&W tool (have to be inferior to -5000) DCPProfile::ApplyState as; - DCPProfile *dcpProf = imgsrc->getDCP(params.icm, currWB, as); + DCPProfile *dcpProf = imgsrc->getDCP (params.icm, currWB, as); LUTu histToneCurve; - ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit , satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); + ipf.rgbProc (baseImg, labView, nullptr, curve1, curve2, curve, shmap, params.toneCurve.saturation, rCurve, gCurve, bCurve, satLimit, satLimitOpacity, ctColorCurve, ctOpacityCurve, opautili, clToningcurve, cl2Toningcurve, customToneCurve1, customToneCurve2, customToneCurvebw1, customToneCurvebw2, rrm, ggm, bbm, autor, autog, autob, expcomp, hlcompr, hlcomprthresh, dcpProf, as, histToneCurve); if (settings->verbose) { - printf("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); + printf ("Output image / Auto B&W coefs: R=%.2f G=%.2f B=%.2f\n", autor, autog, autob); } // if clut was used and size of clut cache == 1 we free the memory used by the clutstore (default clut cache size = 1 for 32 bit OS) @@ -967,25 +971,25 @@ private: // start tile processing...??? - if(params.labCurve.contrast != 0) { //only use hist16 for contrast + if (params.labCurve.contrast != 0) { //only use hist16 for contrast hist16.clear(); #ifdef _OPENMP -#pragma omp parallel + #pragma omp parallel #endif { LUTu hist16thr (hist16.getSize()); // one temporary lookup table per thread hist16thr.clear(); #ifdef _OPENMP -#pragma omp for schedule(static) nowait + #pragma omp for schedule(static) nowait #endif for (int i = 0; i < fh; i++) for (int j = 0; j < fw; j++) { - hist16thr[(int)((labView->L[i][j]))]++; + hist16thr[ (int) ((labView->L[i][j]))]++; } -#pragma omp critical + #pragma omp critical { hist16 += hist16thr; } @@ -996,7 +1000,7 @@ private: CurveFactory::complexLCurve (params.labCurve.brightness, params.labCurve.contrast, params.labCurve.lcurve, hist16, lumacurve, dummy, 1, utili); bool clcutili; - CurveFactory::curveCL(clcutili, params.labCurve.clcurve, clcurve, 1); + CurveFactory::curveCL (clcutili, params.labCurve.clcurve, clcurve, 1); bool ccutili, cclutili; CurveFactory::complexsgnCurve (autili, butili, ccutili, cclutili, params.labCurve.acurve, params.labCurve.bcurve, params.labCurve.cccurve, @@ -1004,34 +1008,34 @@ private: ipf.chromiLuminanceCurve (nullptr, 1, labView, labView, curve1, curve2, satcurve, lhskcurve, clcurve, lumacurve, utili, autili, butili, ccutili, cclutili, clcutili, dummy, dummy); - if((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { - ipf.EPDToneMap(labView, 5, 1); + if ((params.colorappearance.enabled && !params.colorappearance.tonecie) || (!params.colorappearance.enabled)) { + ipf.EPDToneMap (labView, 5, 1); } - ipf.vibrance(labView); + ipf.vibrance (labView); - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.impulsedenoise (labView); } // for all treatments Defringe, Sharpening, Contrast detail ,Microcontrast they are activated if "CIECAM" function are disabled - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.defringe (labView); } if (params.sharpenEdge.enabled) { - ipf.MLsharpen(labView); + ipf.MLsharpen (labView); } if (params.sharpenMicro.enabled) { - if((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { + if ((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) { ipf.MLmicrocontrast (labView); //!params.colorappearance.sharpcie } } - if(((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { + if (((params.colorappearance.enabled && !settings->autocielab) || (!params.colorappearance.enabled)) && params.sharpening.enabled) { float **buffer = new float*[fh]; @@ -1055,22 +1059,22 @@ private: WavOpacityCurveW waOpacityCurveW; WavOpacityCurveWL waOpacityCurveWL; - params.wavelet.getCurves(wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); + params.wavelet.getCurves (wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL ); // directional pyramid wavelet - if(params.dirpyrequalizer.cbdlMethod == "aft") { - if((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { + if (params.dirpyrequalizer.cbdlMethod == "aft") { + if ((params.colorappearance.enabled && !settings->autocielab) || !params.colorappearance.enabled) { ipf.dirpyrequalizer (labView, 1); //TODO: this is the luminance tonecurve, not the RGB one } } bool wavcontlutili = false; - CurveFactory::curveWavContL(wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); + CurveFactory::curveWavContL (wavcontlutili, params.wavelet.wavclCurve, wavclCurve,/* hist16C, dummy,*/ 1); - if(params.wavelet.enabled) { - ipf.ip_wavelet(labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); + if (params.wavelet.enabled) { + ipf.ip_wavelet (labView, labView, 2, WaveParams, wavCLVCurve, waOpacityCurveRG, waOpacityCurveBY, waOpacityCurveW, waOpacityCurveWL, wavclCurve, wavcontlutili, 1); } wavCLVCurve.Reset(); @@ -1080,7 +1084,7 @@ private: int f_w = 1, f_h = 1; int begh = 0, endh = fh; - if(params.colorappearance.tonecie || params.colorappearance.enabled) { + if (params.colorappearance.tonecie || params.colorappearance.enabled) { f_w = fw; f_h = fh; } @@ -1099,21 +1103,21 @@ private: customColCurve3, 1); - if(params.colorappearance.enabled) { + if (params.colorappearance.enabled) { double adap; float fnum = imgsrc->getMetaData()->getFNumber ();// F number float fiso = imgsrc->getMetaData()->getISOSpeed () ;// ISO float fspeed = imgsrc->getMetaData()->getShutterSpeed () ;//speed float fcomp = imgsrc->getMetaData()->getExpComp ();//compensation + - - if(fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { + if (fnum < 0.3f || fiso < 5.f || fspeed < 0.00001f) { adap = 2000.; }//if no exif data or wrong else { float E_V = fcomp + log2 ((fnum * fnum) / fspeed / (fiso / 100.f)); E_V += params.toneCurve.expcomp;// exposure compensation in tonecurve ==> direct EV - E_V += log2(params.raw.expos);// exposure raw white point ; log2 ==> linear to EV - adap = powf(2.f, E_V - 3.f); //cd / m2 + E_V += log2 (params.raw.expos); // exposure raw white point ; log2 ==> linear to EV + adap = powf (2.f, E_V - 3.f); //cd / m2 } LUTf CAMBrightCurveJ; @@ -1121,17 +1125,17 @@ private: float CAMMean = NAN; if (params.sharpening.enabled) { - if(settings->ciecamfloat) { + if (settings->ciecamfloat) { float d, dj, yb; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj, yb; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); } } else { - if(settings->ciecamfloat) { + if (settings->ciecamfloat) { float d, dj, yb; - ipf.ciecam_02float (cieView, float(adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); + ipf.ciecam_02float (cieView, float (adap), begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, d, dj, yb, 1); } else { double dd, dj, yb; ipf.ciecam_02 (cieView, adap, begh, endh, 1, 2, labView, ¶ms, customColCurve1, customColCurve2, customColCurve3, dummy, dummy, CAMBrightCurveJ, CAMBrightCurveQ, CAMMean, 5, 1, true, dd, dj, yb, 1); @@ -1154,7 +1158,7 @@ private: } int imw, imh; - double tmpScale = ipf.resizeScale(¶ms, fw, fh, imw, imh); + double tmpScale = ipf.resizeScale (¶ms, fw, fh, imw, imh); bool labResize = params.resize.enabled && params.resize.method != "Nearest" && tmpScale != 1.0; LabImage *tmplab; @@ -1167,11 +1171,11 @@ private: cw = params.crop.w; ch = params.crop.h; - if(labResize) { // crop lab data - tmplab = new LabImage(cw, ch); + if (labResize) { // crop lab data + tmplab = new LabImage (cw, ch); - for(int row = 0; row < ch; row++) { - for(int col = 0; col < cw; col++) { + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { tmplab->L[row][col] = labView->L[row + cy][col + cx]; tmplab->a[row][col] = labView->a[row + cy][col + cx]; tmplab->b[row][col] = labView->b[row + cy][col + cx]; @@ -1187,16 +1191,16 @@ private: if (labResize) { // resize lab data // resize image - tmplab = new LabImage(imw, imh); + tmplab = new LabImage (imw, imh); ipf.Lanczos (labView, tmplab, tmpScale); delete labView; labView = tmplab; cw = labView->W; ch = labView->H; - if(params.prsharpening.enabled) { - for(int i = 0; i < ch; i++) - for(int j = 0; j < cw; j++) { + if (params.prsharpening.enabled) { + for (int i = 0; i < ch; i++) + for (int j = 0; j < cw; j++) { labView->L[i][j] = labView->L[i][j] < 0.f ? 0.f : labView->L[i][j]; } @@ -1222,7 +1226,7 @@ private: bool useLCMS = false; bool bwonly = params.blackwhite.enabled && !params.colorToning.enabled && !autili && !butili ; - if(params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 + if (params.icm.gamma != "default" || params.icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 GammaValues ga; // if(params.blackwhite.enabled) params.toneCurve.hrenabled=false; @@ -1243,7 +1247,7 @@ private: readyImg = ipf.lab2rgb16 (labView, cx, cy, cw, ch, params.icm, bwonly); if (settings->verbose) { - printf("Output profile_: \"%s\"\n", params.icm.output.c_str()); + printf ("Output profile_: \"%s\"\n", params.icm.output.c_str()); } } @@ -1252,15 +1256,15 @@ private: - if(bwonly) { //force BW r=g=b + if (bwonly) { //force BW r=g=b if (settings->verbose) { - printf("Force BW\n"); + printf ("Force BW\n"); } for (int ccw = 0; ccw < cw; ccw++) { for (int cch = 0; cch < ch; cch++) { - readyImg->r(cch, ccw) = readyImg->g(cch, ccw); - readyImg->b(cch, ccw) = readyImg->g(cch, ccw); + readyImg->r (cch, ccw) = readyImg->g (cch, ccw); + readyImg->b (cch, ccw) = readyImg->g (cch, ccw); } } } @@ -1287,8 +1291,8 @@ private: if (customGamma) { if (!useLCMS) { // use corrected sRGB profile in order to apply a good TRC if present, otherwise use LCMS2 profile generated by lab2rgb16 w/ gamma - ProfileContent pc(jprof); - readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); + ProfileContent pc (jprof); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); } } else { // use the selected output profile if present, otherwise use LCMS2 profile generate by lab2rgb16 w/ gamma @@ -1296,19 +1300,19 @@ private: if (params.icm.output != "" && params.icm.output != ColorManagementParams::NoICMString) { // if ICCStore::getInstance()->getProfile send back an object, then ICCStore::getInstance()->getContent will do too - cmsHPROFILE jprof = ICCStore::getInstance()->getProfile(params.icm.output); //get outProfile + cmsHPROFILE jprof = ICCStore::getInstance()->getProfile (params.icm.output); //get outProfile if (jprof == nullptr) { if (settings->verbose) { - printf("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); + printf ("\"%s\" ICC output profile not found!\n - use LCMS2 substitution\n", params.icm.output.c_str()); } } else { if (settings->verbose) { - printf("Using \"%s\" output profile\n", params.icm.output.c_str()); + printf ("Using \"%s\" output profile\n", params.icm.output.c_str()); } ProfileContent pc = ICCStore::getInstance()->getContent (params.icm.output); - readyImg->setOutputProfile(pc.getData().c_str(), pc.getData().size()); + readyImg->setOutputProfile (pc.getData().c_str(), pc.getData().size()); } } else { // No ICM @@ -1348,13 +1352,13 @@ private: { procparams::ProcParams& params = job->pparams; //ImProcFunctions ipf (¶ms, true); - ImProcFunctions &ipf = *(ipf_p.get()); + ImProcFunctions &ipf = * (ipf_p.get()); int imw, imh; - double scale_factor = ipf.resizeScale(¶ms, fw, fh, imw, imh); + double scale_factor = ipf.resizeScale (¶ms, fw, fh, imw, imh); - std::unique_ptr tmplab(new LabImage(fw, fh)); - ipf.rgb2lab(*baseImg, *tmplab, params.icm.working); + std::unique_ptr tmplab (new LabImage (fw, fh)); + ipf.rgb2lab (*baseImg, *tmplab, params.icm.working); if (params.crop.enabled) { int cx = params.crop.x; @@ -1362,39 +1366,39 @@ private: int cw = params.crop.w; int ch = params.crop.h; - std::unique_ptr cropped(new LabImage(cw, ch)); + std::unique_ptr cropped (new LabImage (cw, ch)); - for(int row = 0; row < ch; row++) { - for(int col = 0; col < cw; col++) { + for (int row = 0; row < ch; row++) { + for (int col = 0; col < cw; col++) { cropped->L[row][col] = tmplab->L[row + cy][col + cx]; cropped->a[row][col] = tmplab->a[row + cy][col + cx]; cropped->b[row][col] = tmplab->b[row + cy][col + cx]; } } - tmplab = std::move(cropped); + tmplab = std::move (cropped); } - assert(params.resize.enabled); + assert (params.resize.enabled); // resize image { - std::unique_ptr resized(new LabImage(imw, imh)); - ipf.Lanczos(tmplab.get(), resized.get(), scale_factor); - tmplab = std::move(resized); + std::unique_ptr resized (new LabImage (imw, imh)); + ipf.Lanczos (tmplab.get(), resized.get(), scale_factor); + tmplab = std::move (resized); } - adjust_procparams(scale_factor); + adjust_procparams (scale_factor); fw = imw; fh = imh; delete baseImg; - baseImg = new Imagefloat(fw, fh); - ipf.lab2rgb(*tmplab, *baseImg, params.icm.working); + baseImg = new Imagefloat (fw, fh); + ipf.lab2rgb (*tmplab, *baseImg, params.icm.working); } - void adjust_procparams(double scale_factor) + void adjust_procparams (double scale_factor) { procparams::ProcParams ¶ms = job->pparams; procparams::ProcParams defaultparams; @@ -1405,32 +1409,41 @@ private: if (params.prsharpening.enabled) { params.sharpening = params.prsharpening; } else { - adjust_radius(defaultparams.sharpening.radius, scale_factor, - params.sharpening.radius); + adjust_radius (defaultparams.sharpening.radius, scale_factor, + params.sharpening.radius); } + params.impulseDenoise.thresh *= scale_factor; + if (scale_factor < 0.5) { params.impulseDenoise.enabled = false; } + params.wavelet.strength *= scale_factor; params.dirpyrDenoise.luma *= scale_factor; //params.dirpyrDenoise.Ldetail += (100 - params.dirpyrDenoise.Ldetail) * scale_factor; auto &lcurve = params.dirpyrDenoise.lcurve; + for (size_t i = 2; i < lcurve.size(); i += 4) { - lcurve[i] *= min(scale_factor * 2, 1.0); + lcurve[i] *= min (scale_factor * 2, 1.0); } - noiseLCurve.Set(lcurve); + + noiseLCurve.Set (lcurve); const char *medmethods[] = { "soft", "33", "55soft", "55", "77", "99" }; + if (params.dirpyrDenoise.median) { auto &key = params.dirpyrDenoise.methodmed == "RGB" ? params.dirpyrDenoise.rgbmethod : params.dirpyrDenoise.medmethod; - for (int i = 1; i < int(sizeof(medmethods)/sizeof(const char *)); ++i) { + + for (int i = 1; i < int (sizeof (medmethods) / sizeof (const char *)); ++i) { if (key == medmethods[i]) { - int j = i - int(1.0 / scale_factor); + int j = i - int (1.0 / scale_factor); + if (j < 0) { params.dirpyrDenoise.median = false; } else { key = medmethods[j]; } + break; } } @@ -1439,24 +1452,27 @@ private: params.epd.scale *= scale_factor; //params.epd.edgeStopping *= scale_factor; - const double dirpyreq_scale = min(scale_factor * 1.5, 1.0); + const double dirpyreq_scale = min (scale_factor * 1.5, 1.0); + for (int i = 0; i < 6; ++i) { - adjust_radius(defaultparams.dirpyrequalizer.mult[i], dirpyreq_scale, - params.dirpyrequalizer.mult[i]); + adjust_radius (defaultparams.dirpyrequalizer.mult[i], dirpyreq_scale, + params.dirpyrequalizer.mult[i]); } + params.dirpyrequalizer.threshold *= scale_factor; - adjust_radius(defaultparams.defringe.radius, scale_factor, - params.defringe.radius); - adjust_radius(defaultparams.sh.radius, scale_factor, params.sh.radius); + adjust_radius (defaultparams.defringe.radius, scale_factor, + params.defringe.radius); + adjust_radius (defaultparams.sh.radius, scale_factor, params.sh.radius); if (params.raw.xtranssensor.method == - procparams::RAWParams::XTransSensor::methodstring[ - procparams::RAWParams::XTransSensor::threePass]) { + procparams::RAWParams::XTransSensor::methodstring[ + procparams::RAWParams::XTransSensor::threePass]) { params.raw.xtranssensor.method = procparams::RAWParams::XTransSensor::methodstring[ - procparams::RAWParams::XTransSensor::onePass]; + procparams::RAWParams::XTransSensor::onePass]; } + if (params.raw.bayersensor.method == procparams::RAWParams::BayerSensor::methodstring[procparams::RAWParams::BayerSensor::pixelshift]) { params.raw.bayersensor.method = procparams::RAWParams::BayerSensor::methodstring[params.raw.bayersensor.pixelShiftLmmse ? procparams::RAWParams::BayerSensor::lmmse : procparams::RAWParams::BayerSensor::amaze]; } @@ -1542,7 +1558,7 @@ private: IImage16* processImage (ProcessingJob* pjob, int& errorCode, ProgressListener* pl, bool tunnelMetaData, bool flush) { - ImageProcessor proc(pjob, errorCode, pl, tunnelMetaData, flush); + ImageProcessor proc (pjob, errorCode, pl, tunnelMetaData, flush); return proc(); } @@ -1556,7 +1572,7 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo IImage16* img = processImage (currentJob, errorCode, bpl, tunnelMetaData, true); if (errorCode) { - bpl->error (M("MAIN_MSG_CANNOTLOAD")); + bpl->error (M ("MAIN_MSG_CANNOTLOAD")); currentJob = nullptr; } else { try { @@ -1572,8 +1588,9 @@ void batchProcessingThread (ProcessingJob* job, BatchProcessingListener* bpl, bo void startBatchProcessing (ProcessingJob* job, BatchProcessingListener* bpl, bool tunnelMetaData) { - if (bpl) - Glib::Thread::create(sigc::bind(sigc::ptr_fun(batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); + if (bpl) { + Glib::Thread::create (sigc::bind (sigc::ptr_fun (batchProcessingThread), job, bpl, tunnelMetaData), 0, true, true, Glib::THREAD_PRIORITY_LOW); + } } diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index 98f5d0ecc..91f58f42e 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -27,8 +27,8 @@ #define MINGREEN0 0.8 #define MAXGREEN0 1.2 -#define MINLA0 0.01 -#define MAXLA0 16384 +#define MINLA0 0.01 +#define MAXLA0 16384 #define CENTERLA0 500 using namespace rtengine; @@ -70,7 +70,7 @@ static double wbSlider2la (double sval) if (sval <= 500) { // linear below center-temp - la= MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); + la = MINLA0 + (sval / 500.0) * (CENTERLA0 - MINLA0); } else { const double slope = (double) (CENTERLA0 - MINLA0) / (MAXLA0 - CENTERLA0); double x = (sval - 500) / 500; // x 0..1 @@ -234,10 +234,10 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degree->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p1VBox->pack_start (*degree); - // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); - // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); - - + // surrsource = Gtk::manage (new Gtk::CheckButton (M ("TP_COLORAPP_SURSOURCE"))); + // surrsource->set_tooltip_markup (M ("TP_COLORAPP_SURSOURCE_TOOLTIP")); + + Gtk::HBox* surrHBox1 = Gtk::manage (new Gtk::HBox ()); surrHBox1->set_spacing (2); surrHBox1->set_tooltip_markup (M ("TP_COLORAPP_SURROUND_TOOLTIP")); @@ -247,12 +247,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" surrsrc->append (M ("TP_COLORAPP_SURROUND_AVER")); surrsrc->append (M ("TP_COLORAPP_SURROUND_DIM")); surrsrc->append (M ("TP_COLORAPP_SURROUND_DARK")); - surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); + surrsrc->append (M ("TP_COLORAPP_SURROUND_EXDARK")); surrsrc->set_active (0); surrHBox1->pack_start (*surrsrc); p1VBox->pack_start (*surrHBox1); - - // p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); + +// p1VBox->pack_start (*surrsource, Gtk::PACK_SHRINK); Gtk::HBox* wbmHBox = Gtk::manage (new Gtk::HBox ()); wbmHBox->set_spacing (2); @@ -263,7 +263,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" wbmodel->append (M ("TP_COLORAPP_WBRT")); wbmodel->append (M ("TP_COLORAPP_WBCAM")); wbmodel->append (M ("TP_COLORAPP_FREE")); - + wbmodel->set_active (0); wbmHBox->pack_start (*wbmodel); p1VBox->pack_start (*wbmHBox); @@ -272,8 +272,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" Gtk::Image* itempR = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - - + + tempsc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempL, itempR, &wbSlider2Temp, &wbTemp2Slider)); greensc = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenL, igreenR)); tempsc->set_tooltip_markup (M ("TP_COLORAPP_TEMP_TOOLTIP")); @@ -282,9 +282,9 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" greensc->show(); p1VBox->pack_start (*tempsc); p1VBox->pack_start (*greensc); - - - // adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 + + +// adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), 0.01, 16384., 0.001, 2000.)); // EV -7 ==> EV 17 adapscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTSCENE"), MINLA0, MAXLA0, 0.01, 1997.4, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adapscen->delay < options.adjusterMaxDelay) { @@ -296,7 +296,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" adapscen->set_tooltip_markup (M ("TP_COLORAPP_ADAPTSCENE_TOOLTIP")); p1VBox->pack_start (*adapscen); - ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); + ybscen = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YBSCENE"), 1, 90, 1, 18)); if (ybscen->delay < options.adjusterMaxDelay) { ybscen->delay = options.adjusterMaxDelay; @@ -306,7 +306,7 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" ybscen->addAutoButton (M ("TP_COLORAPP_ADAP_AUTO_TOOLTIP")); ybscen->set_tooltip_markup (M ("TP_COLORAPP_YBSCENE_TOOLTIP")); p1VBox->pack_start (*ybscen); - + p1Frame->add (*p1VBox); pack_start (*p1Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -316,17 +316,17 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // Process 1 frame - expadjust = Gtk::manage(new MyExpander(false, M ("TP_COLORAPP_LABEL_CAM02"))); + expadjust = Gtk::manage (new MyExpander (false, M ("TP_COLORAPP_LABEL_CAM02"))); setExpandAlignProperties (expadjust, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); expadjust->signal_button_release_event().connect_notify ( sigc::bind ( sigc::mem_fun (this, &ColorAppearance::foldAllButMe), expadjust) ); -/* - Gtk::Frame *p2Frame; - // Vertical box container for the content of the Process 1 frame - Gtk::VBox *p2VBox; + /* + Gtk::Frame *p2Frame; + // Vertical box container for the content of the Process 1 frame + Gtk::VBox *p2VBox; - p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); - p2Frame->set_label_align (0.025, 0.5); -*/ + p2Frame = Gtk::manage (new Gtk::Frame (M ("TP_COLORAPP_LABEL_CAM02")) ); + p2Frame->set_label_align (0.025, 0.5); + */ Gtk::VBox *p2VBox; p2VBox = Gtk::manage ( new Gtk::VBox()); @@ -554,8 +554,8 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" // p2Frame->add (*p2VBox); expadjust->add (*p2VBox, false); - expadjust->setLevel(2); - pack_start (*expadjust); + expadjust->setLevel (2); + pack_start (*expadjust); // pack_start (*p2Frame, Gtk::PACK_EXPAND_WIDGET, 4); @@ -574,12 +574,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" p3VBox = Gtk::manage ( new Gtk::VBox()); p3VBox->set_spacing (2); - + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); - // adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); +// adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), 0.1, 16384., 0.1, 16.)); adaplum = Gtk::manage (new Adjuster (M ("TP_COLORAPP_ADAPTVIEWING"), MINLA0, MAXLA0, 0.01, 16, NULL, NULL, &wbSlider2la, &wbla2Slider)); if (adaplum->delay < options.adjusterMaxDelay) { @@ -603,12 +603,12 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" degreeout->addAutoButton (M ("TP_COLORAPP_DEGREE_AUTO_TOOLTIP")); degreeout->set_tooltip_markup (M ("TP_COLORAPP_DEGREE_TOOLTIP")); p3VBox->pack_start (*degreeout); -/* - Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); - Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); - Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); - Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); -*/ + /* + Gtk::Image* itempL1 = Gtk::manage (new RTImage ("ajd-wb-temp1.png")); + Gtk::Image* itempR1 = Gtk::manage (new RTImage ("ajd-wb-temp2.png")); + Gtk::Image* igreenL1 = Gtk::manage (new RTImage ("ajd-wb-green1.png")); + Gtk::Image* igreenR1 = Gtk::manage (new RTImage ("ajd-wb-green2.png")); + */ tempout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_TEMPERATURE"), MINTEMP0, MAXTEMP0, 5, CENTERTEMP0, itempR1, itempL1, &wbSlider2Temp, &wbTemp2Slider)); greenout = Gtk::manage (new Adjuster (M ("TP_WBALANCE_GREEN"), MINGREEN0, MAXGREEN0, 0.001, 1.0, igreenR1, igreenL1)); ybout = Gtk::manage (new Adjuster (M ("TP_COLORAPP_YB"), 5, 90, 1, 18)); @@ -664,9 +664,9 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" badpixsl->throwOnButtonRelease(); badpixsl->set_tooltip_markup (M ("TP_COLORAPP_BADPIXSL_TOOLTIP")); pack_start (*badpixsl, Gtk::PACK_SHRINK); - - - //reset button + + + //reset button neutral = Gtk::manage (new Gtk::Button (M ("TP_COLORAPP_NEUTRAL"))); setExpandAlignProperties (neutral, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); RTImage *resetImg = Gtk::manage (new RTImage ("gtk-undo-ltr-small.png", "gtk-undo-rtl-small.png")); @@ -677,13 +677,13 @@ ColorAppearance::ColorAppearance () : FoldableToolPanel (this, "colorappearance" neutral->show(); //------------- - + pack_start (*neutral); // ------------------------ Listening events - // surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); +// surrconn = surrsource->signal_toggled().connect ( sigc::mem_fun (*this, &ColorAppearance::surrsource_toggled) ); wbmodelconn = wbmodel->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::wbmodelChanged) ); algoconn = algo->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::algoChanged) ); surroundconn = surround->signal_changed().connect ( sigc::mem_fun (*this, &ColorAppearance::surroundChanged) ); @@ -726,57 +726,57 @@ ColorAppearance::~ColorAppearance () void ColorAppearance::foldAllButMe (GdkEventButton* event, MyExpander *expander) { if (event->button == 3) { - expadjust->set_expanded(expadjust == expander); + expadjust->set_expanded (expadjust == expander); } } -void ColorAppearance::writeOptions(std::vector &tpOpen) +void ColorAppearance::writeOptions (std::vector &tpOpen) { tpOpen.push_back (expadjust->get_expanded ()); } -void ColorAppearance::updateToolState(std::vector &tpOpen) +void ColorAppearance::updateToolState (std::vector &tpOpen) { - if(tpOpen.size() >= 1) { - expadjust->set_expanded(tpOpen.at(0)); + if (tpOpen.size() >= 1) { + expadjust->set_expanded (tpOpen.at (0)); } } void ColorAppearance::neutral_pressed () { - jlight->resetValue (false); - qbright->resetValue (false); - chroma->resetValue (false); - schroma->resetValue (false); - mchroma->resetValue (false); - rstprotection->resetValue (false); - contrast->resetValue (false); - qcontrast->resetValue (false); - colorh->resetValue (false); - tempout->resetValue (false); - greenout->resetValue (false); - ybout->resetValue (false); - tempsc->resetValue (false); - greensc->resetValue (false); - badpixsl->resetValue (false); - wbmodel->set_active (0); - toneCurveMode->set_active (0); - toneCurveMode2->set_active (0); - toneCurveMode3->set_active (0); - shape->reset(); - shape2->reset(); - shape3->reset(); - gamutconn.block (true); - gamut->set_active (true); - gamutconn.block (false); - degree->setAutoValue (true); - degree->resetValue (false); - adapscen->resetValue (false); - adapscen->setAutoValue (true); - degreeout->resetValue (false); - degreeout->setAutoValue (true); - ybscen->resetValue (false); - ybscen->setAutoValue (true); + jlight->resetValue (false); + qbright->resetValue (false); + chroma->resetValue (false); + schroma->resetValue (false); + mchroma->resetValue (false); + rstprotection->resetValue (false); + contrast->resetValue (false); + qcontrast->resetValue (false); + colorh->resetValue (false); + tempout->resetValue (false); + greenout->resetValue (false); + ybout->resetValue (false); + tempsc->resetValue (false); + greensc->resetValue (false); + badpixsl->resetValue (false); + wbmodel->set_active (0); + toneCurveMode->set_active (0); + toneCurveMode2->set_active (0); + toneCurveMode3->set_active (0); + shape->reset(); + shape2->reset(); + shape3->reset(); + gamutconn.block (true); + gamut->set_active (true); + gamutconn.block (false); + degree->setAutoValue (true); + degree->resetValue (false); + adapscen->resetValue (false); + adapscen->setAutoValue (true); + degreeout->resetValue (false); + degreeout->setAutoValue (true); + ybscen->resetValue (false); + ybscen->setAutoValue (true); } bool ColorAppearance::bgTTipQuery (int x, int y, bool keyboard_tooltip, const Glib::RefPtr& tooltip) @@ -876,8 +876,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) surrsrcconn.block (false); // Have to be manually called to handle initial state update surrsrcChanged(); - - + + surroundconn.block (true); if (pedited && !pedited->colorappearance.surround) { @@ -896,8 +896,8 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update surroundChanged(); - - + + wbmodelconn.block (true); if (pedited && !pedited->colorappearance.wbmodel) { @@ -932,9 +932,9 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // Have to be manually called to handle initial state update algoChanged(); - // surrconn.block (true); - // surrsource->set_active (pp->colorappearance.surrsource); - // surrconn.block (false); + // surrconn.block (true); + // surrsource->set_active (pp->colorappearance.surrsource); + // surrconn.block (false); gamutconn.block (true); gamut->set_active (pp->colorappearance.gamut); gamutconn.block (false); @@ -951,7 +951,7 @@ void ColorAppearance::read (const ProcParams* pp, const ParamsEdited* pedited) // sharpcie->set_active (pp->colorappearance.sharpcie); // sharpcieconn.block (false); - // lastsurr = pp->colorappearance.surrsource; +// lastsurr = pp->colorappearance.surrsource; lastgamut = pp->colorappearance.gamut; // lastbadpix=pp->colorappearance.badpix; lastdatacie = pp->colorappearance.datacie; @@ -1026,7 +1026,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.qcontrast = qcontrast->getValue (); pp->colorappearance.colorh = colorh->getValue (); pp->colorappearance.rstprotection = rstprotection->getValue (); - // pp->colorappearance.surrsource = surrsource->get_active(); + // pp->colorappearance.surrsource = surrsource->get_active(); pp->colorappearance.gamut = gamut->get_active(); // pp->colorappearance.badpix = badpix->get_active(); pp->colorappearance.datacie = datacie->get_active(); @@ -1092,7 +1092,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pedited->colorappearance.surrsrc = surrsrc->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.wbmodel = wbmodel->get_active_text() != M ("GENERAL_UNCHANGED"); pedited->colorappearance.algo = algo->get_active_text() != M ("GENERAL_UNCHANGED"); - // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); + // pedited->colorappearance.surrsource = !surrsource->get_inconsistent(); pedited->colorappearance.gamut = !gamut->get_inconsistent(); // pedited->colorappearance.badpix = !badpix->get_inconsistent(); pedited->colorappearance.datacie = !datacie->get_inconsistent(); @@ -1121,8 +1121,8 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) } else if (surrsrc->get_active_row_number() == 3) { pp->colorappearance.surrsrc = "ExtremelyDark"; } - - + + if (surround->get_active_row_number() == 0) { pp->colorappearance.surround = "Average"; } else if (surround->get_active_row_number() == 1) { @@ -1139,7 +1139,7 @@ void ColorAppearance::write (ProcParams* pp, ParamsEdited* pedited) pp->colorappearance.wbmodel = "RawTCAT02"; } else if (wbmodel->get_active_row_number() == 2) { pp->colorappearance.wbmodel = "free"; - + } if (algo->get_active_row_number() == 0) { @@ -1452,7 +1452,7 @@ void ColorAppearance::setDefaults (const ProcParams* defParams, const ParamsEdit void ColorAppearance::autoCamChanged (double ccam, double ccamout) { nextCcam = ccam; - nextCcamout = ccamout; + nextCcamout = ccamout; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->autoCamComputed_(); @@ -1468,7 +1468,7 @@ bool ColorAppearance::autoCamComputed_ () disableListener (); // degree->setEnabled (true); degree->setValue (nextCcam); - degreeout->setValue (nextCcamout); + degreeout->setValue (nextCcamout); enableListener (); return false; @@ -1492,7 +1492,7 @@ bool ColorAppearance::adapCamComputed_ () disableListener (); // degree->setEnabled (true); adapscen->setValue (nextCadap); -// ybscen->setValue (nextYbscn); +// ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1500,7 +1500,7 @@ bool ColorAppearance::adapCamComputed_ () void ColorAppearance::ybCamChanged (int ybsc) { - nextYbscn = ybsc; + nextYbscn = ybsc; const auto func = [] (gpointer data) -> gboolean { static_cast (data)->ybCamComputed_(); @@ -1516,7 +1516,7 @@ bool ColorAppearance::ybCamComputed_ () disableListener (); // degree->setEnabled (true); // adapscen->setValue (nextCadap); - ybscen->setValue (nextYbscn); + ybscen->setValue (nextYbscn); enableListener (); return false; @@ -1551,7 +1551,7 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval) if (a == degree) { listener->panelChanged (EvCATDegree, a->getTextValue()); } else if (a == degreeout) { - listener->panelChanged (EvCATDegreeout, a->getTextValue()); + listener->panelChanged (EvCATDegreeout, a->getTextValue()); } else if (a == adapscen) { listener->panelChanged (EvCATAdapscen, a->getTextValue()); } else if (a == ybscen) { @@ -1615,7 +1615,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } lastAutoDegreeout = degreeout->getAutoValue(); - + if (adapscen->getAutoInconsistent()) { adapscen->setAutoInconsistent (false); adapscen->setAutoValue (false); @@ -1633,7 +1633,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) } lastAutoybscen = ybscen->getAutoValue(); - + } if (listener && (multiImage || getEnabled()) ) { @@ -1647,7 +1647,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegree, M ("GENERAL_DISABLED")); } } - + if (a == degreeout) { if (degreeout->getAutoInconsistent()) { listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_UNCHANGED")); @@ -1657,7 +1657,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoDegreeout, M ("GENERAL_DISABLED")); } } - + if (a == adapscen) { if (adapscen->getAutoInconsistent()) { @@ -1678,7 +1678,7 @@ void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval) listener->panelChanged (EvCATAutoyb, M ("GENERAL_DISABLED")); } } - + } } @@ -1718,13 +1718,14 @@ void ColorAppearance::surroundChanged () void ColorAppearance::wbmodelChanged () { if (wbmodel->get_active_row_number() == 0 || wbmodel->get_active_row_number() == 1) { - tempsc->hide(); - greensc->hide(); - } - if (wbmodel->get_active_row_number() == 2){ - tempsc->show(); - greensc->show(); - } + tempsc->hide(); + greensc->hide(); + } + + if (wbmodel->get_active_row_number() == 2) { + tempsc->show(); + greensc->show(); + } if (listener && (multiImage || getEnabled()) ) { listener->panelChanged (EvCATMethodWB, wbmodel->get_active_text ()); diff --git a/rtgui/colorappearance.h b/rtgui/colorappearance.h index 4afed28cb..3829475ae 100644 --- a/rtgui/colorappearance.h +++ b/rtgui/colorappearance.h @@ -117,7 +117,7 @@ private: Adjuster* greensc; MyExpander* expadjust; - + MyComboBoxText* toneCurveMode; MyComboBoxText* toneCurveMode2; MyComboBoxText* toneCurveMode3; @@ -150,7 +150,7 @@ private: DiagonalCurveEditor* shape2; DiagonalCurveEditor* shape3; double nextCcam, nextCcamout, nextCadap; - int nextYbscn; + int nextYbscn; bool lastAutoDegree; bool lastAutoAdapscen; bool lastAutoDegreeout; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index eb0b77085..ea9248ddc 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1732,7 +1732,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.autodegreeout) { toEdit.colorappearance.autodegreeout = mods.colorappearance.autodegreeout; } - + if (colorappearance.surround) { toEdit.colorappearance.surround = mods.colorappearance.surround; } @@ -1740,7 +1740,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.surrsrc) { toEdit.colorappearance.surrsrc = mods.colorappearance.surrsrc; } - + if (colorappearance.autoadapscen) { toEdit.colorappearance.autoadapscen = mods.colorappearance.autoadapscen; } @@ -1756,7 +1756,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.ybscen) { toEdit.colorappearance.ybscen = mods.colorappearance.ybscen; } - + if (colorappearance.adaplum) { toEdit.colorappearance.adaplum = dontforceSet && options.baBehav[ADDSET_CAT_ADAPTVIEWING] ? toEdit.colorappearance.adaplum + mods.colorappearance.adaplum : mods.colorappearance.adaplum; } @@ -1788,7 +1788,7 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten if (colorappearance.greensc) { toEdit.colorappearance.greensc = mods.colorappearance.greensc; } - + if (colorappearance.ybout) { toEdit.colorappearance.ybout = mods.colorappearance.ybout; } From 6d44b6e79d1d9fa8d83e8202231e31454f09d683 Mon Sep 17 00:00:00 2001 From: Beep6581 Date: Fri, 18 Aug 2017 13:29:21 +0200 Subject: [PATCH 17/17] TP_COLORAPP_ review --- rtdata/languages/default | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index bdd1c9c3b..efe159340 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1277,10 +1277,10 @@ TP_COARSETRAF_TOOLTIP_ROTLEFT;Rotate left.\n\nShortcuts:\n[ - Multiple Ed TP_COARSETRAF_TOOLTIP_ROTRIGHT;Rotate right.\n\nShortcuts:\n] - Multiple Editor Tabs Mode,\nAlt-] - Single Editor Tab Mode. TP_COARSETRAF_TOOLTIP_VFLIP;Flip vertically. TP_COLORAPP_ADAPTSCENE;Scene absolute luminance -TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environement (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. +TP_COLORAPP_ADAPTSCENE_TOOLTIP;Absolute luminance of the scene environment (cd/m²).\n1) Calculated from the Exif data:\nShutter speed - ISO speed - F number - camera exposure correction.\n2) Calculated from the raw white point and RT's Exposure Compensation slider. TP_COLORAPP_ADAPTVIEWING;Viewing absolute luminance (cd/m²) -TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environnement\n(usually 16cd/m²). -TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from Exif data.\nTo set the value manually, uncheck the checkbox first. +TP_COLORAPP_ADAPTVIEWING_TOOLTIP;Absolute luminance of the viewing environment\n(usually 16cd/m²). +TP_COLORAPP_ADAP_AUTO_TOOLTIP;If the checkbox is checked (recommended) RawTherapee calculates an optimum value from the Exif data.\nTo set the value manually, uncheck the checkbox first. TP_COLORAPP_ALGO;Algorithm TP_COLORAPP_ALGO_ALL;All TP_COLORAPP_ALGO_JC;Lightness + Chroma (JC) @@ -1300,8 +1300,8 @@ TP_COLORAPP_CHROMA_TOOLTIP;Chroma in CIECAM02 differs from L*a*b* and RGB chroma TP_COLORAPP_CIECAT_DEGREE;CAT02 adaptation TP_COLORAPP_CONTRAST;Contrast (J) TP_COLORAPP_CONTRAST_Q;Contrast (Q) -TP_COLORAPP_CONTRAST_Q_TOOLTIP;Contrast in CIECAM02 for the Q slider; it differs from L*a*b* and RGB contrast. -TP_COLORAPP_CONTRAST_TOOLTIP;Contrast in CIECAM02 for the J slider; it differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_Q_TOOLTIP;Differs from L*a*b* and RGB contrast. +TP_COLORAPP_CONTRAST_TOOLTIP;Differs from L*a*b* and RGB contrast. TP_COLORAPP_CURVEEDITOR1;Tone curve 1 TP_COLORAPP_CURVEEDITOR1_TOOLTIP;Shows the histogram of L* (L*a*b*) before CIECAM02.\nIf the "Show CIECAM02 output histograms in curves" checkbox is enabled, shows the histogram of J or Q after CIECAM02.\n\nJ and Q are not shown in the main histogram panel.\n\nFor final output refer to the main histogram panel. TP_COLORAPP_CURVEEDITOR2;Tone curve 2 @@ -1328,7 +1328,7 @@ TP_COLORAPP_MODEL_TOOLTIP;White-Point Model.\n\nWB [RT] + [output]: RT's TP_COLORAPP_NEUTRAL;Reset TP_COLORAPP_NEUTRAL_TIP;Reset all sliders checkbox and curves to their default values TP_COLORAPP_RSTPRO;Red & skin-tones protection -TP_COLORAPP_RSTPRO_TOOLTIP;Red and skin-tones protection affects both sliders and curves. +TP_COLORAPP_RSTPRO_TOOLTIP;Red & skin-tones protection affects both sliders and curves. TP_COLORAPP_SHARPCIE;--unused-- TP_COLORAPP_SHARPCIE_TOOLTIP;--unused-- TP_COLORAPP_SURROUND;Surround @@ -1352,8 +1352,8 @@ TP_COLORAPP_TONECIE;Tone mapping using CIECAM02 TP_COLORAPP_TONECIE_TOOLTIP;If this option is disabled, tone mapping is done in L*a*b* space.\nIf this option is enabled, tone mapping is done using CIECAM02.\nThe Tone Mapping tool must be enabled for this setting to take effect. TP_COLORAPP_WBCAM;WB [RT+CAT02] + [output] TP_COLORAPP_WBRT;WB [RT] + [output] -TP_COLORAPP_YB;Yb%(mean luminance) -TP_COLORAPP_YBSCENE;Yb%(mean luminance) +TP_COLORAPP_YB;Yb% (mean luminance) +TP_COLORAPP_YBSCENE;Yb% (mean luminance) TP_COLORAPP_YBSCENE_TOOLTIP;if auto enable, Yb is calculated from the mean value of actual image luminance TP_COLORTONING_AB;o C/L TP_COLORTONING_AUTOSAT;Automatic