mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-23 04:51:44 +00:00
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:
parent
aeb5500ffe
commit
a3d0c68a70
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue