add some comments about how this code is different from base/colorize.c

2008-01-07  Michael Natterer  <mitch@gimp.org>

	* app/gegl/gimpoperationcolorize.c (process): add some comments
	about how this code is different from base/colorize.c


svn path=/trunk/; revision=24564
This commit is contained in:
Michael Natterer 2008-01-07 20:35:30 +00:00 committed by Michael Natterer
parent f0ec8dcb29
commit 5da250fc8f
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2008-01-07 Michael Natterer <mitch@gimp.org>
* app/gegl/gimpoperationcolorize.c (process): add some comments
about how this code is different from base/colorize.c
2008-01-07 Michael Natterer <mitch@gimp.org>
* app/core/core-types.h: include gegl/gegl-types.h instead of

View file

@ -202,9 +202,14 @@ gimp_operation_colorize_process (GeglOperation *operation,
gimp_hsl_to_rgb (&hsl, &rgb);
dest[RED_PIX] = rgb.r;
dest[GREEN_PIX] = rgb.g;
dest[BLUE_PIX] = rgb.b;
/* the code in base/colorize.c would multiply r,b,g with lum,
* but this is a bug since it should multiply with 255. We
* don't repeat this bug here (this is the reason why the gegl
* colorize is brighter than the legacy one).
*/
dest[RED_PIX] = rgb.r; /* * lum; */
dest[GREEN_PIX] = rgb.g; /* * lum; */
dest[BLUE_PIX] = rgb.b; /* * lum */;
dest[ALPHA_PIX] = src[ALPHA_PIX];
src += 4;