diff --git a/ChangeLog b/ChangeLog index 7c1b1a3ca4..aa0d185358 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-07 Michael Natterer + + * app/gegl/gimpoperationcolorize.c (process): add some comments + about how this code is different from base/colorize.c + 2008-01-07 Michael Natterer * app/core/core-types.h: include gegl/gegl-types.h instead of diff --git a/app/gegl/gimpoperationcolorize.c b/app/gegl/gimpoperationcolorize.c index 684922d776..30948ac3ef 100644 --- a/app/gegl/gimpoperationcolorize.c +++ b/app/gegl/gimpoperationcolorize.c @@ -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;