Commit 7880711f authored by Elle Stone's avatar Elle Stone Committed by Michael Natterer

Allow full range to Hue-Saturation Lightness slider

Issue #427: Hue-saturation dialog: lightness in 'Master'

For whatever reason that made sense at the time, the current
Hue-Saturation code divides the result of Lightness slider
adjustments by 2, which means the user can't ever move the
Lightness slider to produce a solid white or black image, and
requires multiple iterations if the user wants to make the image
very light or very dark.

This patch just removes the division by 2, thus allowing the full
range of Lightness changes without having to use multiple
parent b6b8e2c2
Pipeline #112147 passed with stages
in 22 minutes and 33 seconds
......@@ -154,7 +154,7 @@ map_lightness (GimpHueSaturationConfig *config,
GimpHueRange range,
gdouble value)
gdouble v = (config->lightness[GIMP_HUE_RANGE_ALL] + config->lightness[range]) / 2.0;
gdouble v = (config->lightness[GIMP_HUE_RANGE_ALL] + config->lightness[range]);
if (v < 0)
return value * (v + 1.0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment