Improve Dynamic Range Compression - for some images with very high DR - Main and LA (#6931)

* Improve Dynamic Range Compression - for some images with very high DR

* Clean code

* Improve TM fattal with saturation control in LA

* Saturation control fattal in LA

* Re-order paramsedit

* Change history_msg_tmo_satur with saturation
This commit is contained in:
Desmis
2024-02-02 07:42:34 +01:00
committed by GitHub
parent 542946ef43
commit 5349f7a860
14 changed files with 99 additions and 31 deletions

View File

@@ -2568,6 +2568,7 @@ LocallabExposure::LocallabExposure():
expfat(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_FATFRA")))),
fatamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))),
fatdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))),
fatsatur(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FATSAT")))),
norm(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_EQUIL")))),
fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0.5, 2.0, 0.01, 1.))),
fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 0.1, 100.0, 0.01, 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))),
@@ -2617,7 +2618,9 @@ LocallabExposure::LocallabExposure():
strmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2., 2., 0.05, 0.))),
angmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180., 180., 0.1, 0.))),
mask2expCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))),
Lmaskexpshape(static_cast<DiagonalCurveEditor*>(mask2expCurveEditorG->addCurve(CT_Diagonal, "L(L)")))
Lmaskexpshape(static_cast<DiagonalCurveEditor*>(mask2expCurveEditorG->addCurve(CT_Diagonal, "L(L)"))),
Evlocallabtmosatur(ProcEventMapper::getInstance()->newEvent(AUTOEXP, "HISTORY_MSG_LOCAL_TMO_SATUR"))
{
set_orientation(Gtk::ORIENTATION_VERTICAL);
@@ -2705,6 +2708,7 @@ LocallabExposure::LocallabExposure():
decaye->setAdjusterListener(this);
setExpandAlignProperties(exprecove, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START);
normConn = norm->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::normChanged));
fatsaturConn = fatsatur->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::fatsaturChanged));
inversexConn = inversex->signal_toggled().connect(sigc::mem_fun(*this, &LocallabExposure::inversexChanged));
inversex->set_tooltip_text(M("TP_LOCALLAB_INVERS_TOOLTIP"));
@@ -2799,6 +2803,7 @@ LocallabExposure::LocallabExposure():
// fatBox->pack_start(*norm);
// fatBox->pack_start(*fatlevel);
fatBox->pack_start(*fatanchor);
fatBox->pack_start(*fatsatur);
// fatFrame->add(*fatBox);
expfat->add(*fatBox, false);
// pack_start(*fatFrame);
@@ -2985,6 +2990,7 @@ void LocallabExposure::disableListener()
exnoiseMethodConn.block(true);
inversexConn.block(true);
normConn.block(true);
fatsaturConn.block(true);
showmaskexpMethodConn.block(true);
showmaskexpMethodConninv.block(true);
enaExpMaskConn.block(true);
@@ -2999,6 +3005,7 @@ void LocallabExposure::enableListener()
exnoiseMethodConn.block(false);
inversexConn.block(false);
normConn.block(false);
fatsaturConn.block(false);
showmaskexpMethodConn.block(false);
showmaskexpMethodConninv.block(false);
enaExpMaskConn.block(false);
@@ -3084,6 +3091,7 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa
angexp->setValue(spot.angexp);
softradiusexp->setValue(spot.softradiusexp);
norm->set_active(spot.norm);
fatsatur->set_active(spot.fatsatur);
inversex->set_active(spot.inversex);
enaExpMask->set_active(spot.enaExpMask);
enaExpMaskaft->set_active(spot.enaExpMaskaft);
@@ -3175,6 +3183,7 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited*
spot.softradiusexp = softradiusexp->getValue();
spot.inversex = inversex->get_active();
spot.norm = norm->get_active();
spot.fatsatur = fatsatur->get_active();
spot.enaExpMask = enaExpMask->get_active();
spot.enaExpMaskaft = enaExpMaskaft->get_active();
spot.CCmaskexpcurve = CCmaskexpshape->getCurve();
@@ -3780,6 +3789,21 @@ void LocallabExposure::normChanged()
}
}
void LocallabExposure::fatsaturChanged()
{
if (isLocActivated && exp->getEnabled()) {
if (listener) {
if (fatsatur->get_active()) {
listener->panelChanged(Evlocallabtmosatur,
M("GENERAL_ENABLED") + " (" + escapeHtmlChars(getSpotName()) + ")");
} else {
listener->panelChanged(Evlocallabtmosatur,
M("GENERAL_DISABLED") + " (" + escapeHtmlChars(getSpotName()) + ")");
}
}
}
}
void LocallabExposure::inversexChanged()
{