I noticed that the gray filter (javax.swing.GrayFilter) doesn't work.
Seems like a problem in RGBImageFilter. This patch should fix it.

2008-02-18  Roman Kennke  <[EMAIL PROTECTED]>

        * java/awt/image/RGBImageFilter.java
        (setPixels): Don't mask the source pixel.

/Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
Index: java/awt/image/RGBImageFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/RGBImageFilter.java,v
retrieving revision 1.14
diff -u -1 -0 -r1.14 RGBImageFilter.java
--- java/awt/image/RGBImageFilter.java	22 Nov 2006 15:18:32 -0000	1.14
+++ java/awt/image/RGBImageFilter.java	18 Feb 2008 14:20:01 -0000
@@ -238,21 +238,21 @@
         consumer.setPixels(x, y, w, h, newmodel, pixels, offset, scansize);
       }
     else
       {
         int[] filtered = new int[w];
         int index = offset;
         for (int yp = 0; yp < h; yp++)
           {
             for (int xp = 0; xp < w; xp++)
               {
-                filtered[xp] = model.getRGB((pixels[index] & 0xff));
+                filtered[xp] = model.getRGB((pixels[index]));
                 index++;
               }
             index += scansize - w;
             filterRGBPixels(x, y + yp, w, 1, filtered, 0, w);
           }
       }
   }
 
   /**
    * Filters a single pixel from the default ColorModel.

Reply via email to