gimp r24649 - in branches/gimp-2-4: . app/base



Author: weskaggs
Date: Fri Jan 18 18:16:59 2008
New Revision: 24649
URL: http://svn.gnome.org/viewvc/gimp?rev=24649&view=rev

Log:
Bill Skaggs  <weskaggs primate ucdavis edu>

	Merged from trunk:

	* app/base/lut-funcs.c (equalize_lut_fuct): Don't 
	equalize the alpha channel.  Fixes bug #510210.


Modified:
   branches/gimp-2-4/ChangeLog
   branches/gimp-2-4/app/base/lut-funcs.c

Modified: branches/gimp-2-4/app/base/lut-funcs.c
==============================================================================
--- branches/gimp-2-4/app/base/lut-funcs.c	(original)
+++ branches/gimp-2-4/app/base/lut-funcs.c	Fri Jan 18 18:16:59 2008
@@ -293,13 +293,17 @@
 
 static gfloat
 equalize_lut_func (hist_lut_struct *hlut,
-                   gint             n_channels,
+                   gint             nchannels,
                    gint             channel,
                    gfloat           value)
 {
   gint i = 0;
   gint j;
 
+  /* don't equalize the alpha channel */
+  if ((nchannels == 2 || nchannels == 4) && channel == nchannels - 1)
+    return value;
+
   j = (gint) (value * 255.0 + 0.5);
 
   while (hlut->part[channel][i + 1] <= j)



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