gimp r24564 - in trunk: . app/gegl



Author: mitch
Date: Mon Jan  7 20:35:30 2008
New Revision: 24564
URL: http://svn.gnome.org/viewvc/gimp?rev=24564&view=rev

Log:
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



Modified:
   trunk/ChangeLog
   trunk/app/gegl/gimpoperationcolorize.c

Modified: trunk/app/gegl/gimpoperationcolorize.c
==============================================================================
--- trunk/app/gegl/gimpoperationcolorize.c	(original)
+++ trunk/app/gegl/gimpoperationcolorize.c	Mon Jan  7 20:35:30 2008
@@ -202,9 +202,14 @@
 
       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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]