From 5998a25a333c3464ac7fa44872dd725c4d30a409 Mon Sep 17 00:00:00 2001 From: Desmis Date: Mon, 29 Jun 2020 16:22:30 +0200 Subject: [PATCH] Enable exposure when shadows slider different zero --- rtengine/iplocallab.cc | 15 ++++++++++----- rtgui/locallabtools.cc | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 4ce51f1f1..d90d5b590 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -2420,7 +2420,7 @@ void ImProcFunctions::exlabLocal(local_params& lp, int bfh, int bfw, LabImage* b const float hlcompthr = lp.hlcompthr / 200.f; const float hlcomp = lp.hlcomp / 100.f; if (lp.linear > 0.f && lp.expcomp == 0.f) { - lp.expcomp = 0.01f; + lp.expcomp = 0.001f; } if (lp.expmet == 1 && lp.linear > 0.f && lp.laplacexp > 0.1f && !lp.invex) { @@ -12920,7 +12920,7 @@ void ImProcFunctions::Lab_Local( enablefat = true;; } - bool execex = (lp.exposena && (lp.expcomp != 0.f || lp.blac != 0 || lp.laplacexp > 0.1f || lp.strexp != 0.f || enablefat || lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4 || lp.showmaskexpmet == 5 || lp.prevdE || (exlocalcurve && localexutili))); + bool execex = (lp.exposena && (lp.expcomp != 0.f || lp.blac != 0 || lp.shadex > 0 || lp.laplacexp > 0.1f || lp.strexp != 0.f || enablefat || lp.showmaskexpmet == 2 || lp.enaExpMask || lp.showmaskexpmet == 3 || lp.showmaskexpmet == 4 || lp.showmaskexpmet == 5 || lp.prevdE || (exlocalcurve && localexutili))); if (!lp.invex && execex) { int ystart = rtengine::max(static_cast(lp.yc - lp.lyT) - cy, 0); @@ -13085,7 +13085,7 @@ void ImProcFunctions::Lab_Local( } if (lp.expcomp == 0.f) { - lp.expcomp = 0.011f; // to enabled + lp.expcomp = 0.001f; // to enabled } ImProcFunctions::exlabLocal(lp, bfh, bfw, bufexpfin.get(), bufexpfin.get(), hltonecurveloc, shtonecurveloc, tonecurveloc); @@ -13211,16 +13211,21 @@ void ImProcFunctions::Lab_Local( } } } + if (lp.shadex > 0) { + if (lp.expcomp == 0.f) { + lp.expcomp = 0.001f; // to enabled + } + } //shadows with ipshadowshighlight - if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili)) { + if ((lp.expcomp > 0.f) || (exlocalcurve && localexutili)) { if (lp.shadex > 0) { ImProcFunctions::shadowsHighlights(bufexpfin.get(), true, 1, 0, lp.shadex, 40, sk, 0, lp.shcomp); } } if (lp.expchroma != 0.f) { - if ((lp.expcomp != 0.f && lp.expcomp != 0.01f) || (exlocalcurve && localexutili) || lp.laplacexp > 0.1f) { + if ((lp.expcomp != 0.f && lp.expcomp != 0.001f) || (exlocalcurve && localexutili) || lp.laplacexp > 0.1f) { constexpr float ampli = 70.f; const float ch = (1.f + 0.02f * lp.expchroma); const float chprosl = ch <= 1.f ? 99.f * ch - 99.f : clipChro(ampli * ch - ampli); diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 0242e0a89..81b70d7b9 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -2189,7 +2189,7 @@ LocallabExposure::LocallabExposure(): structexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUCCOL"), 0, 100, 1, 0))), blurexpde(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURDE"), 2, 100, 1, 5))), exptoolexp(Gtk::manage(new MyExpander(false, M("TP_LOCALLAB_EXPTOOL")))), - expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), MINEXP, MAXEXP, 0.02, 0.))), + expcomp(Gtk::manage(new Adjuster(M("TP_EXPOSURE_EXPCOMP"), MINEXP, MAXEXP, 0.01, 0.))), black(Gtk::manage(new Adjuster(M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 10, 0))), hlcompr(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0))), hlcomprthresh(Gtk::manage(new Adjuster(M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 0))),