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
This commit is contained in:
Michael Natterer 2008-09-25 18:14:05 +00:00 committed by Michael Natterer
parent aeb5500ffe
commit a3d0c68a70
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,8 @@
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

View file

@ -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;
}
}