Skip to content

Commit

Permalink
Change tooltip BP and WP
Browse files Browse the repository at this point in the history
  • Loading branch information
Desmis committed Dec 13, 2024
1 parent c587f63 commit 1573866
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rtdata/languages/default
Original file line number Diff line number Diff line change
Expand Up @@ -3207,7 +3207,7 @@ TP_LOCALLAB_GHS_LC_TOOLTIP;Slightly increases local contrast that was weakened b
TP_LOCALLAB_GHS_MID;Midtones
TP_LOCALLAB_GHS_MID_TOOLTIP;Adjusts midtone balance after GHS transformation.\n Can be used to rebalance the midtones of the image - only if necessary - after one or more Stretches.
TP_LOCALLAB_GHS_BLACKPOINT_FRAME;Black point/White point/Highlights
TP_LOCALLAB_GHS_BPFRAME_TOOLTIP;Sets the Black point, White point and Highlight for a linear stretch of the image.
TP_LOCALLAB_GHS_BPFRAME_TOOLTIP;Sets the Black point (BP linear), White point (WP linear) and Highlight for a linear stretch of the image.\n\n Black Point (BP linear) and White Point (WP linear) settings are only accessible if Stretch factor (D) is less than 0.002 so as not to disturb the examination of the histogram.\n\n Black point (BP linear) and White point (WP linear) settings are sensitive to the general settings upstream of GHS: Highlight reconstruction, White balance and RAW processes.
TP_LOCALLAB_GHS_BLP;Black point (BP linear)
TP_LOCALLAB_GHS_BLP_TOOLTIP;Sets the Black point for a linear stretch of the image.\n For negatives slider values, in GHS ‘normal’, shadows are raised linearly to avoid excessive noise build-up and facilitate GHS work.\n For positives slider values, the histogram is shifted to the left. For Raw images you can also use Raw-Tab > Raw Black Points – Dehaze, which is more precise. Contrast gained by performing the linear stretch will be evenly distributed over the image.\n\nYou can adjust a linear black point offset either:\n -to account for noise in the dark parts.\n -adjust the histogram.\n\n It is recommended to act on this sliders before implementing the GHS algorithm to avoid clipping data. A very low Stretch factor (D) value (0.001 by default) is recommended for performing this adjustment.\n The label 'Clipped pixel count Shadows:x Highlights=y' shows you the number of pixels that would be clipped without action on the 2 sliders.\n The label Pixel values -Darkest:w Lightest:z shows you the values of real limits in range [0 1].\n\nIn ‘Inverse GHS’ mode the trends are differents and there are possible interactions with the White point.
TP_LOCALLAB_GHS_HLP;White point (WP linear)
Expand Down
31 changes: 30 additions & 1 deletion rtgui/locallabtools.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5056,6 +5056,14 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para
ghs_MID->setValue((double)spot.ghs_MID);
ghs_BLP->setValue((double)spot.ghs_BLP);
ghs_HLP->setValue((double)spot.ghs_HLP);

if(ghs_D->getValue() > 0.002) {
ghs_BLP->set_sensitive(false);
ghs_HLP->set_sensitive(false);
} else {
ghs_BLP->set_sensitive(true);
ghs_HLP->set_sensitive(true);
}

detailSH->setValue((double)spot.detailSH);
tePivot->setValue(spot.tePivot);
Expand Down Expand Up @@ -5394,6 +5402,13 @@ void LocallabShadow::adjusterChanged(Adjuster* a, double newval)
}

if (a == ghs_D) {
if(ghs_D->getValue() > 0.002) {//blur sliders WP and HP si D too big
ghs_BLP->set_sensitive(false);
ghs_HLP->set_sensitive(false);
} else {
ghs_BLP->set_sensitive(true);
ghs_HLP->set_sensitive(true);
}
if (listener) {
listener->panelChanged(Evlocallabghs_D,
ghs_D->getTextValue() + " (" + escapeHtmlChars(getSpotName()) + ")");
Expand Down Expand Up @@ -6136,7 +6151,14 @@ void LocallabShadow::updateShadowGUI1()
ghsMethod->hide();
ghs_slope->hide();
Lab_Frame->hide();

if(ghs_D->getValue() > 0.002) {
ghs_BLP->set_sensitive(false);
ghs_HLP->set_sensitive(false);
} else {
ghs_BLP->set_sensitive(true);
ghs_HLP->set_sensitive(true);
}

if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode
exprecovs->show();
ghsMethod->show();
Expand Down Expand Up @@ -6241,6 +6263,13 @@ void LocallabShadow::updateShadowGUI2()
ghsMethod->hide();
ghs_slope->hide();
Lab_Frame->hide();
if(ghs_D->getValue() > 0.002) {
ghs_BLP->set_sensitive(false);
ghs_HLP->set_sensitive(false);
} else {
ghs_BLP->set_sensitive(true);
ghs_HLP->set_sensitive(true);
}

if (mode == Expert || mode == Normal) { // Keep widget hidden in Simple mode
ghsMethod->show();
Expand Down

0 comments on commit 1573866

Please sign in to comment.