diff --git a/rtdata/languages/default b/rtdata/languages/default index 9648c2ece..30ef63207 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1078,6 +1078,8 @@ HISTORY_MSG_838;Local - Vib gradient strength H HISTORY_MSG_839;Local - Software complexity HISTORY_MSG_840;Local - CL Curve HISTORY_MSG_841;Local - LC curve +HISTORY_MSG_842;Local - Contrast Threshold Mask blur +HISTORY_MSG_843;Local - Radius Mask blur HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2166,6 +2168,7 @@ TP_LOCALLAB_BLUFR;Smooth - Blur - Noise - Grain TP_LOCALLAB_BLUMETHOD_TOOLTIP;To blur the background and isolate the foreground:\n*Blur the background by a RT-spot fully covering the image (high values for scope and transition) - normal or inverse.\n*Isolate the foreground by one or more excluding RT-spot with the tools you want (increse scope), you can use a mask to enhance and amplify the effects TP_LOCALLAB_BLUR;Gaussian Blur - Noise - Grain TP_LOCALLAB_BLURCBDL;Blur levels 0-1-2-3-4 +TP_LOCALLAB_BLURCOL;Radius Mask Blur TP_LOCALLAB_BLURDE;Blur Shape detection TP_LOCALLAB_BUTTON_ADD;Add TP_LOCALLAB_BUTTON_DEL;Delete @@ -2195,6 +2198,7 @@ TP_LOCALLAB_COL_NAME;Name TP_LOCALLAB_COL_VIS;Status TP_LOCALLAB_COMPLEX_METHOD;Software Complexity TP_LOCALLAB_COMPLEX_TOOLTIP; Allow user to select Local adjustements rubrics. +TP_LOCALLAB_CONTCOL;Contrast threshold Mask Blur TP_LOCALLAB_CONTRAST;Contrast TP_LOCALLAB_CONTRESID;Contrast TP_LOCALLAB_CONTTHR;Contrast Threshold diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 34d024ae8..9cacf0fbb 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -257,6 +257,8 @@ struct local_params { float struexp; float blurexp; float blurcol; + float blurcolmask; + float contcolmask; float blurSH; float ligh; float lowA, lowB, highA, highB; @@ -589,7 +591,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall } if (locallab.spots.at(sp).medMethod == "none") { - lp.medmet = -1; + lp.medmet = -1; } else if (locallab.spots.at(sp).medMethod == "33") { lp.medmet = 0; } else if (locallab.spots.at(sp).medMethod == "55") { @@ -775,6 +777,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float structexpo = (float) locallab.spots.at(sp).structexp; float blurexpo = (float) locallab.spots.at(sp).blurexpde; float blurcolor = (float) locallab.spots.at(sp).blurcolde; + float blurcolmask = (float) locallab.spots.at(sp).blurcol; + float contcolmask = (float) locallab.spots.at(sp).contcol; float blurSH = (float) locallab.spots.at(sp).blurSHde; float local_transit = locallab.spots.at(sp).transit; float local_feather = locallab.spots.at(sp).feather; @@ -914,6 +918,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.struexp = structexpo; lp.blurexp = blurexpo; lp.blurcol = blurcolor; + lp.blurcolmask = blurcolmask; + lp.contcolmask = 0.01f * contcolmask; lp.blurSH = blurSH; lp.sens = local_sensi; lp.sensh = local_sensih; @@ -2821,7 +2827,6 @@ static void blendmask(const local_params& lp, int xstart, int ystart, int cx, in originalmas->L[y][x] = CLIP(bufexporig->L[y][x] - bufmaskor->L[y][x]); originalmas->a[y][x] = CLIPC(bufexporig->a[y][x] * (1.f - bufmaskor->a[y][x])); originalmas->b[y][x] = CLIPC(bufexporig->b[y][x] * (1.f - bufmaskor->b[y][x])); - switch (zone) { case 1: { @@ -3433,6 +3438,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int ) { array2D ble(bfw, bfh); + array2D blea(bfw, bfh); + array2D bleb(bfw, bfh); array2D guid(bfw, bfh); float meanfab, fab; mean_fab(xstart, ystart, bfw, bfh, bufcolorig, original, fab, meanfab, chrom); @@ -3474,6 +3481,38 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } + JaggedArray blendblur(bfw, bfh); + + JaggedArray blur(bfw, bfh); + + if (lp.contcolmask > 0.f) { + float contra = lp.contcolmask; + buildBlendMask(bufcolorig->L, blendblur, bfw, bfh, contra, 1.f); + + + float radblur = 0.02f * rad;//empirical value + float rm = radblur / sk; + + if (rm > 0) { + float **mb = blendblur; + gaussianBlur(mb, mb, bfw, bfh, rm); + } + + if (lp.blurcolmask >= 0.25f) { + if (lp.blurcolmask < 200.f) { + gaussianBlur(bufcolorig->L, blur, bfw, bfh, lp.blurcolmask); + } else { + // ImProcFunctions::fftw_convol_blur2(bufcolorig->L, blur, bfw, bfh, lp.blurcolmask, 0, 0); + } + + for (int i = 0; i < bfh; i++) { + for (int j = 0; j < bfw; j++) { + blur[i][j] = intp(blendblur[i][j], bufcolorig->L[i][j], std::max(blur[i][j], 0.0f)); + } + } + } + } + bool HHmaskcurve = false; if (lochhhmasCurve && lhhmasutili) { @@ -3520,6 +3559,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int float kmaskHL = 0.f; float kmaskH = 0.f; float kmasstru = 0.f; + float kmasblur = 0.f; // float kmaskHH = 0.f; // float huemah; // float newhr = 0.f; @@ -3529,6 +3569,14 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int kmasstru = bufcolorig->L[ir][jr] * blendstru[ir][jr]; } + if (lp.contcolmask > 0.f) { + + if (lp.blurcolmask >= 0.25f) { + float prov = intp(blendstru[ir][jr], bufcolorig->L[ir][jr], max(blur[ir][jr], 0.0f)); + kmasblur = bufcolorig->L[ir][jr] - prov ; + } + } + if (locllmasCurve && llmasutili) { kmaskL = 32768.f * LIM01(kinv - kneg * locllmasCurve[(500.f / 32768.f) * bufcolorig->L[ir][jr]]); } @@ -3595,7 +3643,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } */ - bufmaskblurcol->L[ir][jr] = CLIPLOC(kmaskL + kmaskHL + kmasstru); + bufmaskblurcol->L[ir][jr] = CLIPLOC(kmaskL + kmaskHL + kmasstru + kmasblur); // if(HHmaskcurve) { // bufmaskblurcol->a[ir][jr] = CLIPC((kmaskC + chromult * kmaskH) * sincosval.y); // bufmaskblurcol->b[ir][jr] = CLIPC((kmaskC + chromult * kmaskH) * sincosval.x); @@ -3609,6 +3657,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int } ble[ir][jr] = bufmaskblurcol->L[ir][jr] / 32768.f; + blea[ir][jr] = bufmaskblurcol->a[ir][jr] / 32768.f;//must be good perhaps more or less, only incidence on LIM blea bleb + bleb[ir][jr] = bufmaskblurcol->b[ir][jr] / 32768.f; float X, Y, Z; float L = bufcolorig->L[ir][jr]; float a = bufcolorig->a[ir][jr]; @@ -3624,10 +3674,17 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int std::unique_ptr bufprov(new LabImage(bfw, bfh)); bufprov->CopyFrom(bufmaskblurcol); + printf("rad=%f \n", rad); + if (rad != 0.f) { + float blur = rad; + blur = blur < 0.f ? -1.f / blur : 1.f + blur; + int r1 = max(int(4 / sk * blur + 0.5), 1); + int r2 = max(int(25 / sk * blur + 0.5), 1); - if (rad > 0.f) { - guidedFilter(guid, ble, ble, rad * 10.f / sk, 0.001, multiThread, 4); + rtengine::guidedFilter(guid, ble, ble, r2, 0.0001, multiThread); + rtengine::guidedFilter(guid, blea, blea, r1, 0.001, multiThread); + rtengine::guidedFilter(guid, bleb, bleb, r1, 0.001, multiThread); } LUTf lutTonemaskexp(65536); @@ -3640,6 +3697,8 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int for (int ir = 0; ir < bfh; ir++) { for (int jr = 0; jr < bfw; jr++) { bufmaskblurcol->L[ir][jr] = lutTonemaskexp[LIM01(ble[ir][jr]) * 65536.f]; + bufmaskblurcol->a[ir][jr] = blea[ir][jr] * 32768.f; + bufmaskblurcol->b[ir][jr] = bleb[ir][jr] * 32768.f; } } @@ -4377,12 +4436,12 @@ void ImProcFunctions::transit_shapedetect2(int senstype, const LabImage * bufexp if (zone > 0) { //simplified transformed with deltaE and transition - transformed->L[y + ystart][x + xstart] = CLIPLOC(bufexporig->L[y][x] + factorx * realstrdE); - diflc = 328.f * factorx * realstrdE; - transformed->a[y + ystart][x + xstart] = CLIPC(bufexporig->a[y][x] + factorx * realstradE); - difa = 328.f * factorx * realstradE; - transformed->b[y + ystart][x + xstart] = CLIPC(bufexporig->b[y][x] + factorx * realstrbdE); - difb = 328.f * factorx * realstrbdE; + transformed->L[y + ystart][x + xstart] = CLIPLOC(original->L[y + ystart][x + xstart] + factorx * realstrdE); + diflc = factorx * realstrdE; + transformed->a[y + ystart][x + xstart] = CLIPC(original->a[y + ystart][x + xstart] + factorx * realstradE); + difa = factorx * realstradE; + transformed->b[y + ystart][x + xstart] = CLIPC(original->b[y + ystart][x + xstart] + factorx * realstrbdE); + difb = factorx * realstrbdE; float maxdifab = max(fabs(difa), fabs(difb)); if (expshow || vibshow || colshow || SHshow || tmshow) {//show modifications @@ -4395,7 +4454,11 @@ void ImProcFunctions::transit_shapedetect2(int senstype, const LabImage * bufexp transformed->b[y + ystart][x + xstart] = CLIPC(difb); } else if (previewexp || previewvib || previewcol || previewSH || previewtm) {//show deltaE if (fabs(difb) < 500.f) {//if too low to be view use L - difb += 0.2f * diflc; + if(difb < 0.f) { + difb -= 0.5f * diflc; + } else { + difb += 0.5f * diflc; + } } transformed->a[y + ystart][x + xstart] = 0.f; @@ -12498,7 +12561,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o sincosval.x = Chprov == 0.0f ? 0.f : bufcolcalcb / Chprov; if (lp.chro > 0.f) { - float buf = LIM01(chp / 35000.f);//35000 must be globaly good, more than 32768...anf les than !! to avoid calculation min max + float buf = LIM01(chp / 35000.f);//35000 must be globaly good, more than 32768...anf les than !! to avoid calculation min max buf = color_satur.getVal(buf); buf *= 35000.f; chp = buf; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 04a891aac..bd82a5dc7 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -865,6 +865,8 @@ enum ProcEventCode { EvLocallabSpotcomplexMethod = 838, Evlocallabclshape = 839, Evlocallablcshape = 840, + Evlocallabblurcol = 841, + Evlocallabcontcol = 842, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index a9139ff13..36488d55c 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2469,6 +2469,8 @@ LocallabParams::LocallabSpot::LocallabSpot() : strcolh(0.), angcol(0.), blurcolde(5), + blurcol(0.2), + contcol(0.), blendmaskcol(0), radmaskcol(0.0), chromaskcol(0.0), @@ -2855,6 +2857,8 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && HHmaskcurve == other.HHmaskcurve && HHhmaskcurve == other.HHhmaskcurve && blurcolde == other.blurcolde + && blurcol == other.blurcol + && contcol == other.contcol && softradiuscol == other.softradiuscol && opacol == other.opacol && mercol == other.mercol @@ -4180,6 +4184,8 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strcolh, "Locallab", "Strcolh_" + std::to_string(i), spot.strcolh, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).angcol, "Locallab", "Angcol_" + std::to_string(i), spot.angcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcolde, "Locallab", "Blurcolde_" + std::to_string(i), spot.blurcolde, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurcol, "Locallab", "Blurcol_" + std::to_string(i), spot.blurcol, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).contcol, "Locallab", "Contcol_" + std::to_string(i), spot.contcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskcol, "Locallab", "Blendmaskcol_" + std::to_string(i), spot.blendmaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskcol, "Locallab", "Radmaskcol_" + std::to_string(i), spot.radmaskcol, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskcol, "Locallab", "Chromaskcol_" + std::to_string(i), spot.chromaskcol, keyFile); @@ -5640,6 +5646,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Strcolh_" + std::to_string(i), pedited, spot.strcolh, spotEdited.strcolh); assignFromKeyfile(keyFile, "Locallab", "Angcol_" + std::to_string(i), pedited, spot.angcol, spotEdited.angcol); assignFromKeyfile(keyFile, "Locallab", "Blurcolde_" + std::to_string(i), pedited, spot.blurcolde, spotEdited.blurcolde); + assignFromKeyfile(keyFile, "Locallab", "Blurcol_" + std::to_string(i), pedited, spot.blurcol, spotEdited.blurcol); + assignFromKeyfile(keyFile, "Locallab", "Contcol_" + std::to_string(i), pedited, spot.contcol, spotEdited.contcol); assignFromKeyfile(keyFile, "Locallab", "Blendmaskcol_" + std::to_string(i), pedited, spot.blendmaskcol, spotEdited.blendmaskcol); assignFromKeyfile(keyFile, "Locallab", "Radmaskcol_" + std::to_string(i), pedited, spot.radmaskcol, spotEdited.radmaskcol); assignFromKeyfile(keyFile, "Locallab", "Chromaskcol_" + std::to_string(i), pedited, spot.chromaskcol, spotEdited.chromaskcol); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index ab8435405..6507fff20 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1012,6 +1012,8 @@ struct LocallabParams { double strcolh; double angcol; int blurcolde; + double blurcol; + double contcol; int blendmaskcol; double radmaskcol; double chromaskcol; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 718612706..2c6ccb187 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -868,7 +868,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //Evlocallabstrvibh LUMINANCECURVE, // EvLocallabSpotcomplexMethod LUMINANCECURVE, // Evlocallabclshape - LUMINANCECURVE // Evlocallablcshape + LUMINANCECURVE, // Evlocallablcshape + LUMINANCECURVE, // Evlocallabblurcol + LUMINANCECURVE // Evlocallabcontcol }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index b0f0ca875..f06d9bbeb 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -274,7 +274,7 @@ Locallab::Locallab(): strcolh(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTRHUE"), -6., 6., 0.05, 0.))), angcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), blendmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - radmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), + radmaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), chromaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), @@ -286,6 +286,8 @@ Locallab::Locallab(): strumaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), mercol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERDCOL"), 0.0, 100.0, 0.5, 18.))), merlucol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_MERLUCOL"), 0.0, 100.0, 0.5, 32., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + blurcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCOL"), 0.2, 200., 0.5, 0.2))), + contcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTCOL"), 0., 200., 0.5, 0.))), // Exposure expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), -2.0, 3.0, 0.05, 0.0))), hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0))), @@ -301,7 +303,7 @@ Locallab::Locallab(): strexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4., 4., 0.05, 0.))), angexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), blendmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), - radmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), + radmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), chromaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), @@ -347,7 +349,7 @@ s_tonalwidth(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, sh_radius(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_RADIUS"), 0, 100, 1, 40))), sensihs(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), blendmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), -radmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +radmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), strSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -4., 4., 0.05, 0.))), angSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180, 180, 0.1, 0.))), @@ -365,7 +367,7 @@ saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., pastels(Gtk::manage(new Adjuster(M("TP_VIBRANCE_PASTELS"), -100., 100., 1., 0.))), sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), blendmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), -radmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +radmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), chromaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), @@ -407,7 +409,7 @@ softradiustm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0 amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))), satur(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SATUR"), -100., 100., 0.1, 0.))),//by default satur = 0 ==> use Mantiuk value blendmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), -radmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +radmasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), chromasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.05, 5.0, 0.01, 1.))), slomasktm(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), @@ -482,7 +484,7 @@ blurcbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCBDL"), 0., 100., 0.1, 0.)) sensicb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSICB"), 0, 100, 1, 15))), softradiuscb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SOFTRADIUSCOL"), 0.0, 100.0, 0.5, 0.))), blendmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), -radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +radmaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), -10.0, 500.0, 0.1, 0.))), chromaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), gammaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskcb(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), @@ -691,12 +693,15 @@ pe(nullptr) strengthgrid->setAdjusterListener(this); structcol->setAdjusterListener(this); blurcolde->setAdjusterListener(this); + blurcol->setAdjusterListener(this); + contcol->setAdjusterListener(this); strcol->setAdjusterListener(this); angcol->setAdjusterListener(this); strcolab->setAdjusterListener(this); strcolh->setAdjusterListener(this); blendmaskcol->setAdjusterListener(this); + radmaskcol->setLogScale(10, -10); radmaskcol->setAdjusterListener(this); chromaskcol->setAdjusterListener(this); gammaskcol->setAdjusterListener(this); @@ -1057,6 +1062,7 @@ pe(nullptr) colorBox->pack_start(*blurcolde); } + colorBox->pack_start(*gradcolFrame); if (complexsoft < 2) { @@ -1116,7 +1122,7 @@ pe(nullptr) merge1colFrame->add(*mergecolBox); } - Gtk::HSeparator* const separatorstru = Gtk::manage(new Gtk::HSeparator()); + Gtk::HSeparator* const separatorblur = Gtk::manage(new Gtk::HSeparator()); ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock()); maskcolBox->pack_start(*showmaskcolMethod, Gtk::PACK_SHRINK, 4); @@ -1132,6 +1138,14 @@ pe(nullptr) maskcolBox->pack_start(*toolcol); } + Gtk::HSeparator* const separatorstru = Gtk::manage(new Gtk::HSeparator()); + + if (complexsoft < 1) { + maskcolBox->pack_start(*separatorblur, Gtk::PACK_SHRINK, 2); + maskcolBox->pack_start(*contcol); + maskcolBox->pack_start(*blurcol); + } + maskcolBox->pack_start(*separatorstru, Gtk::PACK_SHRINK, 2); toolcolFrame->set_label_align(0.025, 0.5); ToolParamBlock* const toolcolBox = Gtk::manage(new ToolParamBlock()); @@ -1265,6 +1279,7 @@ pe(nullptr) angexp->setAdjusterListener(this); blendmaskexp->setAdjusterListener(this); + radmaskexp->setLogScale(10, -10); radmaskexp->setAdjusterListener(this); chromaskexp->setAdjusterListener(this); gammaskexp->setAdjusterListener(this); @@ -1552,6 +1567,7 @@ pe(nullptr) sh_radius->setAdjusterListener(this); sensihs->setAdjusterListener(this); blendmaskSH->setAdjusterListener(this); + radmaskSH->setLogScale(10, -10); radmaskSH->setAdjusterListener(this); blurSHde->setAdjusterListener(this); strSH->setAdjusterListener(this); @@ -1756,7 +1772,7 @@ pe(nullptr) saturated->setAdjusterListener(this); pastels->setAdjusterListener(this); - + if (showtooltip) { psThreshold->set_tooltip_markup(M("TP_VIBRANCE_PSTHRESHOLD_TOOLTIP")); @@ -1772,6 +1788,7 @@ pe(nullptr) sensiv->setAdjusterListener(this); blendmaskvib->setAdjusterListener(this); + radmaskvib->setLogScale(10, -10); radmaskvib->setAdjusterListener(this); chromaskvib->setAdjusterListener(this); gammaskvib->setAdjusterListener(this); @@ -2146,6 +2163,7 @@ pe(nullptr) blendmasktm->setAdjusterListener(this); + radmasktm->setLogScale(10, -10); radmasktm->setAdjusterListener(this); chromasktm->setAdjusterListener(this); gammasktm->setAdjusterListener(this); @@ -2693,6 +2711,7 @@ pe(nullptr) contresid->setAdjusterListener(this); blurcbdl->setAdjusterListener(this); blendmaskcb->setAdjusterListener(this); + radmaskcb->setLogScale(10, -10); radmaskcb->setAdjusterListener(this); chromaskcb->setAdjusterListener(this); gammaskcb->setAdjusterListener(this); @@ -2796,11 +2815,11 @@ pe(nullptr) maskcbBox->pack_start(*chromaskcb, Gtk::PACK_SHRINK, 0); // if (complexsoft < 2) { - maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0); // } // if (complexsoft < 2) { - maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0); + maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0); // } maskcbBox->pack_start(*mask2cbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor @@ -2810,13 +2829,13 @@ pe(nullptr) cbdlBox->pack_start(*separator, Gtk::PACK_SHRINK, 2); // if (complexsoft < 2) { - cbdlBox->pack_start(*chromacbdl); + cbdlBox->pack_start(*chromacbdl); // } cbdlBox->pack_start(*threshold); // if (complexsoft < 2) { - cbdlBox->pack_start(*blurcbdl); + cbdlBox->pack_start(*blurcbdl); // } residFrame->set_label_align(0.025, 0.5); @@ -2826,11 +2845,11 @@ pe(nullptr) residFrame->add(*residBox); // if (complexsoft < 2) { - cbdlBox->pack_start(*residFrame); + cbdlBox->pack_start(*residFrame); // } // if (complexsoft < 2) { - cbdlBox->pack_start(*softradiuscb); + cbdlBox->pack_start(*softradiuscb); // } cbdlBox->pack_start(*sensicb); @@ -4308,6 +4327,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).sensi = sensi->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).structcol = structcol->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).blurcolde = blurcolde->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).blurcol = blurcol->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).contcol = contcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).strcol = strcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).angcol = angcol->getValue(); pp->locallab.spots.at(pp->locallab.selspot).strcolab = strcolab->getValue(); @@ -4402,7 +4423,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (complexsoft > 0) { LLmaskcolshapewav->reset(); - } + } pp->locallab.spots.at(pp->locallab.selspot).llcurve = llshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).cccurve = ccshape->getCurve(); @@ -4565,6 +4586,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).strvibab = strvibab->getValue(); pp->locallab.spots.at(pp->locallab.selspot).strvibh = strvibh->getValue(); pp->locallab.spots.at(pp->locallab.selspot).angvib = angvib->getValue(); + if (complexsoft == 2) { skinTonesCurve->reset(); } @@ -4859,6 +4881,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).HHhmaskcurve = pe->locallab.spots.at(pp->locallab.selspot).HHhmaskcurve || !HHhmaskshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).blurcolde = pe->locallab.spots.at(pp->locallab.selspot).blurcolde || blurcolde->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).blurcol = pe->locallab.spots.at(pp->locallab.selspot).blurcol || blurcol->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).contcol = pe->locallab.spots.at(pp->locallab.selspot).contcol || contcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pe->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).radmaskcol = pe->locallab.spots.at(pp->locallab.selspot).radmaskcol || radmaskcol->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).chromaskcol = pe->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); @@ -5222,6 +5246,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskcurve || !HHmaskshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).HHhmaskcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHhmaskcurve || !HHhmaskshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).blurcolde = pedited->locallab.spots.at(pp->locallab.selspot).blurcolde || blurcolde->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).blurcol = pedited->locallab.spots.at(pp->locallab.selspot).blurcol || blurcol->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).contcol = pedited->locallab.spots.at(pp->locallab.selspot).contcol || contcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskcol || blendmaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).radmaskcol = pedited->locallab.spots.at(pp->locallab.selspot).radmaskcol || radmaskcol->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol = pedited->locallab.spots.at(pp->locallab.selspot).chromaskcol || chromaskcol->getEditedState(); @@ -6113,6 +6139,8 @@ void Locallab::merMethodChanged() sensi->set_sensitive(true); structcol->set_sensitive(true); blurcolde->set_sensitive(true); + blurcol->set_sensitive(true); + contcol->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(true); // strcolh->set_sensitive(false); @@ -6124,6 +6152,8 @@ void Locallab::merMethodChanged() sensi->set_sensitive(true); structcol->set_sensitive(true); blurcolde->set_sensitive(true); + blurcol->set_sensitive(true); + contcol->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(true); special->set_sensitive(true); @@ -6136,6 +6166,8 @@ void Locallab::merMethodChanged() sensi->set_sensitive(false); structcol->set_sensitive(false); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); special->set_sensitive(false); @@ -6147,6 +6179,8 @@ void Locallab::merMethodChanged() sensi->set_sensitive(false); structcol->set_sensitive(false); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); special->set_sensitive(false); @@ -6159,6 +6193,8 @@ void Locallab::merMethodChanged() mask7->show(); conthrcol->hide(); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); sensi->set_sensitive(false); structcol->set_sensitive(false); H2CurveEditorG->set_sensitive(true); @@ -7002,6 +7038,8 @@ void Locallab::inversChanged() structcol->show(); strengthgrid->hide(); blurcolde->show(); + blurcol->show(); + contcol->show(); softradiuscol->show(); showmaskcolMethod->show(); // Being able to change Color & Light mask visibility is useless in batch mode gridFrame->hide(); @@ -7020,6 +7058,8 @@ void Locallab::inversChanged() expmaskcol1->hide(); structcol->hide(); blurcolde->show(); + blurcol->hide(); + contcol->hide(); gridFrame->hide(); strengthgrid->hide(); softradiuscol->hide(); @@ -7038,6 +7078,8 @@ void Locallab::inversChanged() expmaskcol1->show(); structcol->show(); blurcolde->show(); + blurcol->show(); + contcol->show(); gridFrame->show(); softradiuscol->show(); showmaskcolMethodinv->hide(); @@ -7577,6 +7619,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c strcolh->setDefault((double)defSpot->strcolh); angcol->setDefault((double)defSpot->angcol); blurcolde->setDefault((double)defSpot->blurcolde); + blurcol->setDefault((double)defSpot->blurcol); + contcol->setDefault((double)defSpot->contcol); blendmaskcol->setDefault((double)defSpot->blendmaskcol); radmaskcol->setDefault(defSpot->radmaskcol); chromaskcol->setDefault(defSpot->chromaskcol); @@ -7796,6 +7840,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c angcol->setDefaultEditedState(Irrelevant); strengthgrid->setDefault((double)defSpot->strengthgrid); blurcolde->setDefaultEditedState(Irrelevant); + blurcol->setDefaultEditedState(Irrelevant); + contcol->setDefaultEditedState(Irrelevant); blendmaskcol->setDefaultEditedState(Irrelevant); radmaskcol->setDefaultEditedState(Irrelevant); chromaskcol->setDefaultEditedState(Irrelevant); @@ -8019,6 +8065,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c angcol->setDefaultEditedState(defSpotState->angcol ? Edited : UnEdited); strengthgrid->setDefaultEditedState(defSpotState->strengthgrid ? Edited : UnEdited); blurcolde->setDefaultEditedState(defSpotState->blurcolde ? Edited : UnEdited); + blurcol->setDefaultEditedState(defSpotState->blurcol ? Edited : UnEdited); + contcol->setDefaultEditedState(defSpotState->contcol ? Edited : UnEdited); blendmaskcol->setDefaultEditedState(defSpotState->blendmaskcol ? Edited : UnEdited); radmaskcol->setDefaultEditedState(defSpotState->radmaskcol ? Edited : UnEdited); chromaskcol->setDefaultEditedState(defSpotState->chromaskcol ? Edited : UnEdited); @@ -8320,12 +8368,24 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == blurcol) { + if (listener) { + listener->panelChanged(Evlocallabblurcol, blurcol->getTextValue()); + } + } + if (a == structcol) { if (listener) { listener->panelChanged(Evlocallabstructcol, structcol->getTextValue()); } } + if (a == contcol) { + if (listener) { + listener->panelChanged(Evlocallabcontcol, contcol->getTextValue()); + } + } + if (a == strcol) { if (listener) { listener->panelChanged(Evlocallabstrcol, strcol->getTextValue()); @@ -9560,6 +9620,8 @@ void Locallab::setBatchMode(bool batchMode) angcol->showEditedCB(); strengthgrid->showEditedCB(); blurcolde->showEditedCB(); + blurcol->showEditedCB(); + contcol->showEditedCB(); blendmaskcol->showEditedCB(); radmaskcol->showEditedCB(); chromaskcol->showEditedCB(); @@ -10120,8 +10182,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con labgridmerg->setParams(0, 0, pp->locallab.spots.at(index).labgridAHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, pp->locallab.spots.at(index).labgridBHighmerg / rtengine::procparams::LocallabParams::LABGRIDL_CORR_MAX, false); if (complexsoft == 2) { - labgrid->setParams(0, 0,0, 0, false); - } + labgrid->setParams(0, 0, 0, 0, false); + } strengthgrid->setValue(pp->locallab.spots.at(index).strengthgrid); sensi->setValue(pp->locallab.spots.at(index).sensi); @@ -10227,6 +10289,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con llshape->setCurve(pp->locallab.spots.at(index).llcurve); lcshape->setCurve(pp->locallab.spots.at(index).lccurve); } + ccshape->setCurve(pp->locallab.spots.at(index).cccurve); clshape->setCurve(pp->locallab.spots.at(index).clcurve); rgbshape->setCurve(pp->locallab.spots.at(index).rgbcurve); @@ -10238,7 +10301,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con HHshape->reset(); rgbshape->reset(); } - + LHshape->setCurve(pp->locallab.spots.at(index).LHcurve); HHshape->setCurve(pp->locallab.spots.at(index).HHcurve); invers->set_active(pp->locallab.spots.at(index).invers); @@ -10250,12 +10313,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con HHmaskshape->setCurve(pp->locallab.spots.at(index).HHmaskcurve); HHhmaskshape->setCurve(pp->locallab.spots.at(index).HHhmaskcurve); blurcolde->setValue(pp->locallab.spots.at(index).blurcolde); + blurcol->setValue(pp->locallab.spots.at(index).blurcol); + contcol->setValue(pp->locallab.spots.at(index).contcol); blendmaskcol->setValue(pp->locallab.spots.at(index).blendmaskcol); radmaskcol->setValue(pp->locallab.spots.at(index).radmaskcol); chromaskcol->setValue(pp->locallab.spots.at(index).chromaskcol); gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol); slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol); - + shadmaskcol->setValue(pp->locallab.spots.at(index).shadmaskcol); strumaskcol->setValue(pp->locallab.spots.at(index).strumaskcol); lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol); @@ -10289,7 +10354,10 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con if (complexsoft > 0) { lapmaskcol->setValue(0); LLmaskcolshapewav->reset(); + blurcol->setValue(0.2); + contcol->setValue(0.); } + // Exposure expexpose->setEnabled(pp->locallab.spots.at(index).expexpose); expcomp->setValue(pp->locallab.spots.at(index).expcomp); @@ -10574,6 +10642,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con strumaskbl->setValue(0); shadmaskbl->setValue(0); } + if (complexsoft > 0) { lapmaskbl->setValue(0); LLmaskblshapewav->reset(); @@ -10611,9 +10680,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con satur->setValue(0); rewei->setValue(0); } + if (complexsoft > 0) { lapmasktm->setValue(0); } + // Retinex expreti->setEnabled(pp->locallab.spots.at(index).expreti); @@ -10878,6 +10949,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con HHmaskshape->setUnChanged(!spotState->HHmaskcurve); HHhmaskshape->setUnChanged(!spotState->HHhmaskcurve); blurcolde->setEditedState(spotState->blurcolde ? Edited : UnEdited); + blurcol->setEditedState(spotState->blurcol ? Edited : UnEdited); + contcol->setEditedState(spotState->contcol ? Edited : UnEdited); blendmaskcol->setEditedState(spotState->blendmaskcol ? Edited : UnEdited); radmaskcol->setEditedState(spotState->radmaskcol ? Edited : UnEdited); chromaskcol->setEditedState(spotState->chromaskcol ? Edited : UnEdited); @@ -11216,6 +11289,8 @@ void Locallab::updateSpecificGUIState() if (multiImage && invers->get_inconsistent()) { llCurveEditorG->show(); clCurveEditorG->show(); + blurcol->show(); + contcol->show(); HCurveEditorG->show(); qualitycurveMethod->show(); labqualcurv->show(); @@ -11232,6 +11307,8 @@ void Locallab::updateSpecificGUIState() llCurveEditorG->show(); clCurveEditorG->hide(); HCurveEditorG->hide(); + blurcol->hide(); + contcol->hide(); qualitycurveMethod->hide(); labqualcurv->hide(); expmaskcol->show(); @@ -11248,6 +11325,8 @@ void Locallab::updateSpecificGUIState() HCurveEditorG->show(); qualitycurveMethod->show(); labqualcurv->show(); + blurcol->show(); + contcol->show(); expmaskcol->show(); expmaskcol1->show(); structcol->show(); @@ -11270,6 +11349,8 @@ void Locallab::updateSpecificGUIState() // strcolh->set_sensitive(false); sensi->set_sensitive(true); blurcolde->set_sensitive(true); + blurcol->set_sensitive(true); + contcol->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(true); special->set_sensitive(true); @@ -11281,6 +11362,8 @@ void Locallab::updateSpecificGUIState() // strcolh->set_sensitive(false); sensi->set_sensitive(true); blurcolde->set_sensitive(true); + blurcol->set_sensitive(true); + contcol->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(true); special->set_sensitive(true); @@ -11293,6 +11376,8 @@ void Locallab::updateSpecificGUIState() strcolh->set_sensitive(true); sensi->set_sensitive(false); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); special->set_sensitive(false); @@ -11304,6 +11389,8 @@ void Locallab::updateSpecificGUIState() structcol->set_sensitive(false); sensi->set_sensitive(false); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); strcolh->set_sensitive(true); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); @@ -11317,6 +11404,8 @@ void Locallab::updateSpecificGUIState() strcolh->set_sensitive(true); sensi->set_sensitive(false); blurcolde->set_sensitive(false); + blurcol->set_sensitive(false); + contcol->set_sensitive(false); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); special->set_sensitive(false); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 00fa770e6..589867765 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -189,6 +189,8 @@ private: Adjuster* const strumaskcol; Adjuster* const mercol; Adjuster* const merlucol; + Adjuster* const blurcol; + Adjuster* const contcol; // Exposure Adjuster* const expcomp; Adjuster* const hlcompr; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 70d727305..b609d2b93 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1005,6 +1005,8 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).strcolh = locallab.spots.at(j).strcolh && pSpot.strcolh == otherSpot.strcolh; locallab.spots.at(j).angcol = locallab.spots.at(j).angcol && pSpot.angcol == otherSpot.angcol; locallab.spots.at(j).blurcolde = locallab.spots.at(j).blurcolde && pSpot.blurcolde == otherSpot.blurcolde; + locallab.spots.at(j).blurcol = locallab.spots.at(j).blurcol && pSpot.blurcol == otherSpot.blurcol; + locallab.spots.at(j).contcol = locallab.spots.at(j).contcol && pSpot.contcol == otherSpot.contcol; locallab.spots.at(j).blendmaskcol = locallab.spots.at(j).blendmaskcol && pSpot.blendmaskcol == otherSpot.blendmaskcol; locallab.spots.at(j).radmaskcol = locallab.spots.at(j).radmaskcol && pSpot.radmaskcol == otherSpot.radmaskcol; locallab.spots.at(j).chromaskcol = locallab.spots.at(j).chromaskcol && pSpot.chromaskcol == otherSpot.chromaskcol; @@ -2964,6 +2966,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).blurcolde = mods.locallab.spots.at(i).blurcolde; } + if (locallab.spots.at(i).blurcol) { + toEdit.locallab.spots.at(i).blurcol = mods.locallab.spots.at(i).blurcol; + } + + if (locallab.spots.at(i).contcol) { + toEdit.locallab.spots.at(i).contcol = mods.locallab.spots.at(i).contcol; + } + if (locallab.spots.at(i).structcol) { toEdit.locallab.spots.at(i).structcol = mods.locallab.spots.at(i).structcol; } @@ -5152,6 +5162,8 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : strcolh(v), angcol(v), blurcolde(v), + blurcol(v), + contcol(v), blendmaskcol(v), radmaskcol(v), chromaskcol(v), @@ -5506,6 +5518,8 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) strcolh = v; angcol = v; blurcolde = v; + blurcol = v; + contcol = v; blendmaskcol = v; radmaskcol = v; chromaskcol = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 54d606e8c..f4ccdfac7 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -439,6 +439,8 @@ public: bool strcolh; bool angcol; bool blurcolde; + bool blurcol; + bool contcol; bool blendmaskcol; bool radmaskcol; bool chromaskcol;