Commit a3d0c68a authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

fix calculation of final lookup table to not darken the image.

2008-09-25  Michael Natterer  <mitch@gimp.org>

	* app/base/colorize.c (colorize_calculate): fix calculation of
	final lookup table to not darken the image.


svn path=/trunk/; revision=27062
parent aeb5500f
2008-09-25 Michael Natterer <mitch@gimp.org>
* app/base/colorize.c (colorize_calculate): fix calculation of
final lookup table to not darken the image.
2008-09-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-dnd.c
......
......@@ -67,9 +67,13 @@ colorize_calculate (Colorize *colorize)
gimp_hsl_to_rgb (&hsl, &rgb);
colorize->final_red_lookup[i] = i * rgb.r;
colorize->final_green_lookup[i] = i * rgb.g;
colorize->final_blue_lookup[i] = i * rgb.b;
/* this used to read i * rgb.r,g,b in GIMP 2.4, but this produced
* darkened results, multiplying with 255 is correct and preserves
* the lightness unless modified with the slider.
*/
colorize->final_red_lookup[i] = 255.0 * rgb.r;
colorize->final_green_lookup[i] = 255.0 * rgb.g;
colorize->final_blue_lookup[i] = 255.0 * rgb.b;
}
}
......
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