diff --git a/rtdata/languages/default b/rtdata/languages/default index f68a97b39..18dc589ca 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2480,6 +2480,7 @@ TP_LOCALLAB_EXPCBDL_TOOLTIP;In the case of contaminated sensor (type "grease"), TP_LOCALLAB_EXPCHROMA;Chroma compensation TP_LOCALLAB_EXPCHROMA_TOOLTIP;Only in association with exposure compensation and PDE Ipol.\nAvoids desaturation of colors TP_LOCALLAB_EXPCOLOR_TOOLTIP;In the case of small defects.\n\nRed-eyes : red-centered circular selector, spot delimiters close to the eye, weak scope, "lightness" -100, "chrominance" -100.\n\nSpotIR :Circular selector centered on the defect, spot delimiters close to the default - reduce "chrominance", possibly act on "scope" to reduce the extent of the action.\n\nDust - grease (small) :Circular selector centered on the defect (adapt the size of the spot), spot delimiters not too close to the defect to allow an inconspicuous transition. a) "Transition" (low values) and "Transition weak" (high values); b) act on "lightness" and possibly on "chrominance" or "Color correction grid - direct" to approach the rendering of the polluted zone to that of the healthy zone; c) act moderately on "scope" to modulate the desired action.\n\nYou can also complete with Gaussian blur (Smooth Blur and noise) +TP_LOCALLAB_EXPCOMP_TOOLTIP;For portrait or images with low color gradient, you can change "Shape detection" in "settings":\n\nIncrease 'Threshold ΔE scope'\nReduce 'ΔE weakening'\nIncrease 'Balance ΔE ab-L' TP_LOCALLAB_EXPCONTRASTPYR_TOOLTIP;See the documentation of wavelet levels.\nHowever there are some differences: more tools and closer to the details.\nEx: Tone mapping for wavelet levels. TP_LOCALLAB_EXPCONTRAST_TOOLTIP;Avoid spots that are too small(< 32x32 pixels).\nUse low transition values and high weakening transition values and scope to simulate small RT-spot and deal wth defects.\nUse if necessary the module 'Clarity & Sharp mask and Blend images' by adjusting 'Soft radius' to reduce artifacts. TP_LOCALLAB_EXPCURV;Curves diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index d69be9de8..9b982cd84 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -1351,7 +1351,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float proexp = lp.expcomp; if (std::fabs(proexp) < 0.6f) { float interm = std::fabs(proexp) / 0.6f; - interm = SQR(interm); + interm = pow(interm, 3.f); lp.expcomp = proexp * interm; } lp.expchroma = locallab.spots.at(sp).expchroma / 100.; @@ -5267,6 +5267,12 @@ void ImProcFunctions::InverseColorLight_Local(bool tonequ, bool tonecurv, int sp } } + if ((lp.expcomp != 0.f) || (exlocalcurve)) { + if (lp.shadex > 0) { + ImProcFunctions::shadowsHighlights(temp.get(), true, 1, 0, lp.shadex, 40, sk, 0, lp.shcomp); + } + } + if (lp.expchroma != 0.f) { const float ch = (1.f + 0.02f * lp.expchroma) ; float chprosl; @@ -13268,7 +13274,7 @@ void ImProcFunctions::Lab_Local( } //inverse - else if (lp.invex && (lp.expcomp != 0.0 || lp.laplacexp > 0.1f || params->locallab.spots.at(sp).fatamount > 1.f || (exlocalcurve && localexutili) || lp.enaExpMaskinv || lp.showmaskexpmetinv == 1) && lp.exposena) { + else if (lp.invex && (lp.expcomp != 0.0 || lp.laplacexp > 0.1f || lp.blac != 0 || lp.hlcomp > 0.f || lp.shadex > 0 || params->locallab.spots.at(sp).fatamount > 1.f || (exlocalcurve && localexutili) || lp.enaExpMaskinv || lp.showmaskexpmetinv == 1) && lp.exposena) { constexpr float adjustr = 2.f; std::unique_ptr bufmaskblurexp; std::unique_ptr originalmaskexp; @@ -13333,6 +13339,19 @@ void ImProcFunctions::Lab_Local( return; } + if (lp.shadex > 0) { + if (lp.expcomp == 0.f) { + lp.expcomp = 0.001f; // to enabled + } + } + + + if (lp.hlcomp > 0.f) { + if (lp.expcomp == 0.f) { + lp.expcomp = 0.001f; // to enabled + } + } + InverseColorLight_Local(false, false, sp, 1, lp, originalmaskexp.get(), lightCurveloc, hltonecurveloc, shtonecurveloc, tonecurveloc, exlocalcurve, cclocalcurve, adjustr, localcutili, lllocalcurve, locallutili, original, transformed, cx, cy, hueref, chromaref, lumaref, sk); if (params->locallab.spots.at(sp).recurs) { diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 81b70d7b9..1dd5513da 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -2266,6 +2266,8 @@ LocallabExposure::LocallabExposure(): setExpandAlignProperties(exptoolexp, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); + // expcomp->setLogScale(10, 0); + expcomp->setAdjusterListener(this); black->setAdjusterListener(this); @@ -2467,6 +2469,7 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) { if (showTooltips) { exp->set_tooltip_text(M("TP_LOCALLAB_EXPOSURE_TOOLTIP")); + expcomp->set_tooltip_text(M("TP_LOCALLAB_EXPCOMP_TOOLTIP")); expMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); structexp->set_tooltip_text(M("TP_LOCALLAB_STRUCT_TOOLTIP")); pdeFrame->set_tooltip_text(M("TP_LOCALLAB_PDEFRAME_TOOLTIP")); @@ -2492,29 +2495,6 @@ void LocallabExposure::updateAdviceTooltips(const bool showTooltips) expchroma->set_tooltip_text(M("TP_LOCALLAB_EXPCHROMA_TOOLTIP")); } else { exp->set_tooltip_text(""); - expMethod->set_tooltip_text(""); - structexp->set_tooltip_text(""); - pdeFrame->set_tooltip_text(""); - exnoiseMethod->set_tooltip_text(""); - laplacexp->set_tooltip_text(M("")); - balanexp->set_tooltip_text(M("")); - gamm->set_tooltip_text(M("")); - linear->set_tooltip_text(M("")); - fatFrame->set_tooltip_text(""); - sensiex->set_tooltip_text(""); - shapeexpos->setTooltip(""); - strexp->set_tooltip_text(""); - expmaskexp->set_tooltip_text(""); - CCmaskexpshape->setTooltip(""); - LLmaskexpshape->setTooltip(""); - HHmaskexpshape->setTooltip(""); - radmaskexp->set_tooltip_text(""); - lapmaskexp->set_tooltip_text(""); - strmaskexp->set_tooltip_text(""); - Lmaskexpshape->setTooltip(""); - blendmaskexp->set_tooltip_text(M("")); - mask2expCurveEditorG->set_tooltip_text(M("")); - expchroma->set_tooltip_text(M("")); } } @@ -3231,7 +3211,8 @@ void LocallabExposure::updateExposureGUI3() } structexp->hide(); - shadex->hide(); + // shadex->hide(); + shadex->show(); softradiusexp->hide(); expgradexp->hide(); showmaskexpMethod->hide();