diff --git a/rtdata/languages/default b/rtdata/languages/default index 16c8c9160..42ea031eb 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -903,6 +903,9 @@ HISTORY_MSG_649;Local - Exp soft radius HISTORY_MSG_650;Local - Color mask chroma HISTORY_MSG_651;Local - Color mask gamma HISTORY_MSG_652;Local - Color mask slope +HISTORY_MSG_653;Local - SH mask chroma +HISTORY_MSG_654;Local - SH mask gamma +HISTORY_MSG_655;Local - SH mask slope HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 9932c47fb..fe92e406b 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -157,6 +157,9 @@ struct local_params { float blendmaexp; float radmaSH; float blendmaSH; + float chromaSH; + float gammaSH; + float slomaSH; float struexp; float blurexp; float blurcol; @@ -496,6 +499,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float softradiusexpo = ((float) locallab.spots.at(sp).softradiusexp); float blendmaskSH = ((float) locallab.spots.at(sp).blendmaskSH) / 100.f ; float radmaskSH = ((float) locallab.spots.at(sp).radmaskSH); + float chromaskSH = ((float) locallab.spots.at(sp).chromaskSH); + float gammaskSH = ((float) locallab.spots.at(sp).gammaskSH); + float slomaskSH = ((float) locallab.spots.at(sp).slomaskSH); float structexpo = (float) locallab.spots.at(sp).structexp; float blurexpo = (float) locallab.spots.at(sp).blurexpde; float blurcolor = (float) locallab.spots.at(sp).blurcolde; @@ -558,6 +564,9 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.blendmaexp = blendmaskexpo; lp.blendmaSH = blendmaskSH; lp.radmaSH = radmaskSH; + lp.chromaSH = chromaskSH; + lp.gammaSH = gammaskSH; + lp.slomaSH = slomaskSH; lp.struexp = structexpo; lp.blurexp = blurexpo; @@ -6915,7 +6924,52 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o float meanfab = 0.f; float fab = 0.f; - mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab, 0.f); + mean_fab(begx, begy, cx, cy, xEn, yEn, bufexporig, transformed, original, fab, meanfab, lp.chromaSH); + + LUTf *gammamaskSH = nullptr; + LUTf lutTonemaskSH; + lutTonemaskSH(65536); + double pwr = 1.0 / lp.gammaSH; + double gamm = lp.gammaSH; + double ts = lp.slomaSH; + double gamm2 = lp.gammaSH; + GammaValues g_a; + if (gamm2 < 1.) { + std::swap(pwr, gamm); + } + + int mode = 0; + Color::calcGamma(pwr, ts, mode, g_a); // call to calcGamma with selected gamma and slope + + double start; + double add; + + if (gamm2 < 1.) { + start = g_a[2]; + add = g_a[4]; + } else { + start = g_a[3]; + add = g_a[4]; + } + + double mul = 1. + g_a[4]; + + + for (int i = 0; i < 65536; i++) { + double val = (i) / 65535.; + double x; + + if (gamm2 < 1.) { + x = Color::igammareti(val, gamm, start, ts, mul, add); + } else { + x = Color::gammareti(val, gamm, start, ts, mul, add); + } + + lutTonemaskSH[i] = CLIP(x * 65535.); // CLIP avoid in some case extra values + } + +// gamma_mask(lutTonemask, pwr, gamm, ts, gamm2); + gammamaskSH = &lutTonemaskSH; #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) @@ -6939,7 +6993,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o bufexporig->L[loy - begy][lox - begx] = original->L[y][x]; } } - +//printf("fab=%f \n", fab); #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif @@ -7001,23 +7055,24 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o guid[ir][jr] = bufexporig->L[ir][jr] / 32768.f; } - // } } - if ((lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 3) && lp.radmaSH > 0.f) { - guidedFilter(guid, ble, ble, lp.radmaSH * 10.f / sk, 0.001, multiThread, 4); -//float maxsh = -100.f; + if ((lp.showmaskSHmet == 2 || lp.enaSHMask || lp.showmaskSHmet == 3) /*&& lp.radmaSH > 0.f*/) { + if (lp.radmaSH > 0.f) { + guidedFilter(guid, ble, ble, lp.radmaSH * 10.f / sk, 0.001, multiThread, 4); + } #ifdef _OPENMP #pragma omp parallel for schedule(dynamic,16) #endif - for (int ir = 0; ir < bfh; ir++) //fill with 0 + for (int ir = 0; ir < bfh; ir++) for (int jr = 0; jr < bfw; jr++) { - + float L_; bufmaskblurSH->L[ir][jr] = LIM01(ble[ir][jr]) * 32768.f; + L_ = 2.f * bufmaskblurSH->L[ir][jr]; + bufmaskblurSH->L[ir][jr] = 0.5f * (*gammamaskSH)[L_]; } - // printf("maxsh=%f \n", maxsh); } float radiusb = 1.f / sk; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index b6443fb08..451195b68 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -679,6 +679,9 @@ enum ProcEventCode { Evlocallabchromaskcol = 649, Evlocallabgammaskcol = 650, Evlocallabslomaskcol = 651, + EvlocallabchromaskSH = 652, + EvlocallabgammaskSH = 653, + EvlocallabslomaskSH = 654, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 176b3badb..61283ae56 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2428,6 +2428,9 @@ LocallabParams::LocallabSpot::LocallabSpot() : radmaskSH(10.0), blurSHde(5), inverssh(false), + chromaskSH(0.0), + gammaskSH(1.0), + slomaskSH(0.0), // Vibrance expvibrance(false), saturated(0), @@ -2603,6 +2606,9 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && radmaskSH == other.radmaskSH && blurSHde == other.blurSHde && inverssh == other.inverssh + && chromaskSH == other.chromaskSH + && gammaskSH == other.gammaskSH + && slomaskSH == other.slomaskSH // Vibrance && expvibrance == other.expvibrance && saturated == other.saturated @@ -3735,6 +3741,9 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskSH, "Locallab", "RadmaskSH_" + std::to_string(i), spot.radmaskSH, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blurSHde, "Locallab", "BlurSHde_" + std::to_string(i), spot.blurSHde, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).inverssh, "Locallab", "Inverssh_" + std::to_string(i), spot.inverssh, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskSH, "Locallab", "ChromaskSH_" + std::to_string(i), spot.chromaskSH, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskSH, "Locallab", "GammaskSH_" + std::to_string(i), spot.gammaskSH, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskSH, "Locallab", "SlomaskSH_" + std::to_string(i), spot.slomaskSH, keyFile); // Vibrance saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expvibrance, "Locallab", "Expvibrance_" + std::to_string(i), spot.expvibrance, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).saturated, "Locallab", "Saturated_" + std::to_string(i), spot.saturated, keyFile); @@ -4995,6 +5004,9 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "RadmaskSH_" + std::to_string(i), pedited, spot.radmaskSH, spotEdited.radmaskSH); assignFromKeyfile(keyFile, "Locallab", "BlurSHde_" + std::to_string(i), pedited, spot.blurSHde, spotEdited.blurSHde); assignFromKeyfile(keyFile, "Locallab", "Inverssh_" + std::to_string(i), pedited, spot.inverssh, spotEdited.inverssh); + assignFromKeyfile(keyFile, "Locallab", "ChromaskSH_" + std::to_string(i), pedited, spot.chromaskSH, spotEdited.chromaskSH); + assignFromKeyfile(keyFile, "Locallab", "GammaskSH_" + std::to_string(i), pedited, spot.gammaskSH, spotEdited.gammaskSH); + assignFromKeyfile(keyFile, "Locallab", "SlomaskSH_" + std::to_string(i), pedited, spot.slomaskSH, spotEdited.slomaskSH); // Vibrance assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + std::to_string(i), pedited, spot.expvibrance, spotEdited.expvibrance); assignFromKeyfile(keyFile, "Locallab", "Saturated_" + std::to_string(i), pedited, spot.saturated, spotEdited.saturated); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 19da3f8da..4a29591fa 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1029,6 +1029,9 @@ struct LocallabParams { double radmaskSH; int blurSHde; bool inverssh; + double chromaskSH; + double gammaskSH; + double slomaskSH; // Vibrance bool expvibrance; int saturated; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 3c961afce..c04eea41f 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -678,7 +678,10 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvLocallabsoftradiusexp LUMINANCECURVE, //EvLocallabchromaskcol LUMINANCECURVE, //EvLocallabgammaskcol - LUMINANCECURVE //EvLocallabslomaskcol + LUMINANCECURVE, //EvLocallabslomaskcol + LUMINANCECURVE, //EvLocallabchromaskSH + LUMINANCECURVE, //EvLocallabgammaskSH + LUMINANCECURVE //EvLocallabslomaskSH }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index bb2720bc1..286b209ba 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -116,6 +116,9 @@ Locallab::Locallab(): 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, 10.))), blurSHde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), + chromaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), + gammaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), + slomaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), // Vibrance saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., 0.))), pastels(Gtk::manage(new Adjuster(M("TP_VIBRANCE_PASTELS"), -100., 100., 1., 0.))), @@ -551,6 +554,9 @@ Locallab::Locallab(): blendmaskSH->setAdjusterListener(this); radmaskSH->setAdjusterListener(this); blurSHde->setAdjusterListener(this); + chromaskSH->setAdjusterListener(this); + gammaskSH->setAdjusterListener(this); + slomaskSH->setAdjusterListener(this); enaSHMaskConn = enaSHMask->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::enaSHMaskChanged)); inversshConn = inverssh->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::inversshChanged)); @@ -606,6 +612,9 @@ Locallab::Locallab(): maskSHBox->pack_start(*maskSHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskSHBox->pack_start(*blendmaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*radmaskSH, Gtk::PACK_SHRINK, 0); + maskSHBox->pack_start(*chromaskSH, Gtk::PACK_SHRINK, 0); + maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0); + maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0); maskSHFrame->add(*maskSHBox); shadhighBox->pack_start(*maskSHFrame); @@ -1746,6 +1755,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).radmaskSH = radmaskSH->getValue(); pp->locallab.spots.at(pp->locallab.selspot).blurSHde = blurSHde->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).inverssh = inverssh->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).chromaskSH = chromaskSH->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).gammaskSH = gammaskSH->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).slomaskSH = slomaskSH->getValue(); // Vibrance pp->locallab.spots.at(pp->locallab.selspot).expvibrance = expvibrance->getEnabled(); @@ -1938,6 +1950,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).radmaskSH = pe->locallab.spots.at(pp->locallab.selspot).radmaskSH || radmaskSH->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).blurSHde = pe->locallab.spots.at(pp->locallab.selspot).blurSHde || blurSHde->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).inverssh = pe->locallab.spots.at(pp->locallab.selspot).inverssh || !inverssh->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).chromaskSH = pe->locallab.spots.at(pp->locallab.selspot).chromaskSH || chromaskSH->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).gammaskSH = pe->locallab.spots.at(pp->locallab.selspot).gammaskSH || gammaskSH->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).slomaskSH = pe->locallab.spots.at(pp->locallab.selspot).slomaskSH || slomaskSH->getEditedState(); // Vibrance pe->locallab.spots.at(pp->locallab.selspot).expvibrance = pe->locallab.spots.at(pp->locallab.selspot).expvibrance || !expvibrance->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).saturated = pe->locallab.spots.at(pp->locallab.selspot).saturated || saturated->getEditedState(); @@ -2115,6 +2130,9 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).radmaskSH = pedited->locallab.spots.at(pp->locallab.selspot).radmaskSH || radmaskSH->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).blurSHde = pedited->locallab.spots.at(pp->locallab.selspot).blurSHde || blurSHde->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).inverssh = pedited->locallab.spots.at(pp->locallab.selspot).inverssh || !inverssh->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).chromaskSH = pedited->locallab.spots.at(pp->locallab.selspot).chromaskSH || chromaskSH->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).gammaskSH = pedited->locallab.spots.at(pp->locallab.selspot).gammaskSH || gammaskSH->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).slomaskSH = pedited->locallab.spots.at(pp->locallab.selspot).slomaskSH || slomaskSH->getEditedState(); // Vibrance pedited->locallab.spots.at(pp->locallab.selspot).expvibrance = pedited->locallab.spots.at(pp->locallab.selspot).expvibrance || !expvibrance->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).saturated = pedited->locallab.spots.at(pp->locallab.selspot).saturated || saturated->getEditedState(); @@ -2693,6 +2711,7 @@ void Locallab::inversexChanged() maskexpFrame->show(); structexp->show(); blurexpde->show(); + softradiusexp->show(); showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode } else if (inversex->get_active()) { sensiex->show(); @@ -2700,6 +2719,7 @@ void Locallab::inversexChanged() maskexpFrame->hide(); structexp->hide(); blurexpde->show(); + softradiusexp->hide(); } else { sensiex->show(); @@ -2707,6 +2727,7 @@ void Locallab::inversexChanged() maskexpFrame->show(); structexp->show(); blurexpde->show(); + softradiusexp->show(); if (batchMode) { showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode @@ -2999,6 +3020,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe blendmaskSH->setDefault((double)defSpot->blendmaskSH); radmaskSH->setDefault(defSpot->radmaskSH); blurSHde->setDefault((double)defSpot->blurSHde); + chromaskSH->setDefault(defSpot->chromaskSH); + gammaskSH->setDefault(defSpot->gammaskSH); + slomaskSH->setDefault(defSpot->slomaskSH); // Vibrance saturated->setDefault((double)defSpot->saturated); pastels->setDefault((double)defSpot->pastels); @@ -3103,6 +3127,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe blendmaskSH->setDefaultEditedState(Irrelevant); radmaskSH->setDefaultEditedState(Irrelevant); blurSHde->setDefaultEditedState(Irrelevant); + chromaskSH->setDefaultEditedState(Irrelevant); + gammaskSH->setDefaultEditedState(Irrelevant); + slomaskSH->setDefaultEditedState(Irrelevant); // Vibrance saturated->setDefaultEditedState(Irrelevant); pastels->setDefaultEditedState(Irrelevant); @@ -3211,6 +3238,9 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe blendmaskSH->setDefaultEditedState(defSpotState->blendmaskSH ? Edited : UnEdited); radmaskSH->setDefaultEditedState(defSpotState->radmaskSH ? Edited : UnEdited); blurSHde->setDefaultEditedState(defSpotState->blurSHde ? Edited : UnEdited); + chromaskSH->setDefaultEditedState(defSpotState->chromaskSH ? Edited : UnEdited); + gammaskSH->setDefaultEditedState(defSpotState->gammaskSH ? Edited : UnEdited); + slomaskSH->setDefaultEditedState(defSpotState->slomaskSH ? Edited : UnEdited); // Vibrance saturated->setDefaultEditedState(defSpotState->saturated ? Edited : UnEdited); pastels->setDefaultEditedState(defSpotState->pastels ? Edited : UnEdited); @@ -3554,6 +3584,23 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == chromaskSH) { + if (listener) { + listener->panelChanged(EvlocallabchromaskSH, chromaskSH->getTextValue()); + } + } + + if (a == gammaskSH) { + if (listener) { + listener->panelChanged(EvlocallabgammaskSH, gammaskSH->getTextValue()); + } + } + + if (a == slomaskSH) { + if (listener) { + listener->panelChanged(EvlocallabslomaskSH, slomaskSH->getTextValue()); + } + } } @@ -3964,6 +4011,9 @@ void Locallab::setBatchMode(bool batchMode) blendmaskSH->showEditedCB(); radmaskSH->showEditedCB(); blurSHde->showEditedCB(); + chromaskSH->showEditedCB(); + gammaskSH->showEditedCB(); + slomaskSH->showEditedCB(); // Vibrance saturated->showEditedCB(); pastels->showEditedCB(); @@ -4357,6 +4407,9 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con radmaskSH->setValue(pp->locallab.spots.at(index).radmaskSH); blurSHde->setValue(pp->locallab.spots.at(index).blurSHde); inverssh->set_active(pp->locallab.spots.at(index).inverssh); + chromaskSH->setValue(pp->locallab.spots.at(index).chromaskSH); + gammaskSH->setValue(pp->locallab.spots.at(index).gammaskSH); + slomaskSH->setValue(pp->locallab.spots.at(index).slomaskSH); // Vibrance expvibrance->setEnabled(pp->locallab.spots.at(index).expvibrance); saturated->setValue(pp->locallab.spots.at(index).saturated); @@ -4577,6 +4630,9 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con radmaskSH->setEditedState(spotState->radmaskSH ? Edited : UnEdited); blurSHde->setEditedState(spotState->blurSHde ? Edited : UnEdited); inverssh->set_inconsistent(multiImage && !spotState->inverssh); + chromaskSH->setEditedState(spotState->chromaskSH ? Edited : UnEdited); + gammaskSH->setEditedState(spotState->gammaskSH ? Edited : UnEdited); + slomaskSH->setEditedState(spotState->slomaskSH ? Edited : UnEdited); // Vibrance expvibrance->set_inconsistent(!spotState->expvibrance); @@ -4731,6 +4787,7 @@ void Locallab::updateSpecificGUIState() maskexpFrame->show(); structexp->show(); blurexpde->show(); + softradiusexp->show(); showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode } else if (inversex->get_active()) { sensiex->show(); @@ -4738,12 +4795,14 @@ void Locallab::updateSpecificGUIState() maskexpFrame->hide(); structexp->hide(); blurexpde->show(); + softradiusexp->hide(); } else { sensiex->show(); curveEditorG->show(); maskexpFrame->show(); structexp->show(); blurexpde->show(); + softradiusexp->show(); if (batchMode) { showmaskexpMethod->hide(); // Being able to change Color & Light mask visibility is useless in batch mode diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 536f05517..9a4244036 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -134,6 +134,9 @@ private: Adjuster* const blendmaskSH; Adjuster* const radmaskSH; Adjuster* const blurSHde; + Adjuster* const chromaskSH; + Adjuster* const gammaskSH; + Adjuster* const slomaskSH; // Vibrance Adjuster* const saturated; Adjuster* const pastels; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 50b53071b..7a0d379c5 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1017,6 +1017,9 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).radmaskSH = locallab.spots.at(j).radmaskSH && pSpot.radmaskSH == otherSpot.radmaskSH; locallab.spots.at(j).blurSHde = locallab.spots.at(j).blurSHde && pSpot.blurSHde == otherSpot.blurSHde; locallab.spots.at(j).inverssh = locallab.spots.at(j).inverssh && pSpot.inverssh == otherSpot.inverssh; + locallab.spots.at(j).chromaskSH = locallab.spots.at(j).chromaskSH && pSpot.chromaskSH == otherSpot.chromaskSH; + locallab.spots.at(j).gammaskSH = locallab.spots.at(j).gammaskSH && pSpot.gammaskSH == otherSpot.gammaskSH; + locallab.spots.at(j).slomaskSH = locallab.spots.at(j).slomaskSH && pSpot.slomaskSH == otherSpot.slomaskSH; // Vibrance locallab.spots.at(j).expvibrance = locallab.spots.at(j).expvibrance && pSpot.expvibrance == otherSpot.expvibrance; locallab.spots.at(j).saturated = locallab.spots.at(j).saturated && pSpot.saturated == otherSpot.saturated; @@ -2870,6 +2873,18 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).inverssh = mods.locallab.spots.at(i).inverssh; } + if (locallab.spots.at(i).chromaskSH) { + toEdit.locallab.spots.at(i).chromaskSH = mods.locallab.spots.at(i).chromaskSH; + } + + if (locallab.spots.at(i).gammaskSH) { + toEdit.locallab.spots.at(i).gammaskSH = mods.locallab.spots.at(i).gammaskSH; + } + + if (locallab.spots.at(i).slomaskSH) { + toEdit.locallab.spots.at(i).slomaskSH = mods.locallab.spots.at(i).slomaskSH; + } + // Vibrance if (locallab.spots.at(i).expvibrance) { toEdit.locallab.spots.at(i).expvibrance = mods.locallab.spots.at(i).expvibrance; @@ -4181,6 +4196,9 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : radmaskSH(v), blurSHde(v), inverssh(v), + chromaskSH(v), + gammaskSH(v), + slomaskSH(v), // Vibrance expvibrance(v), saturated(v), @@ -4353,6 +4371,9 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) radmaskSH = v; blurSHde = v; inverssh = v; + chromaskSH = v; + gammaskSH = v; + slomaskSH = v; // Vibrance expvibrance = v; saturated = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 411b823a0..f6c07c269 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -444,6 +444,9 @@ public: bool radmaskSH; bool blurSHde; bool inverssh; + bool chromaskSH; + bool gammaskSH; + bool slomaskSH; // Vibrance bool expvibrance; bool saturated;