classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] CropImageFilter fix


From: Thomas Fitzsimmons
Subject: [cp-patches] CropImageFilter fix
Date: Fri, 02 Sep 2005 14:48:54 -0400

Hi,

We were setting consumer pixels starting at the wrong offset in
CropImageFilter.  This was causing ArrayIndexOutOfBounds exceptions.
I've committed this fix, closing PR23700.

Tom

2005-09-02  Thomas Fitzsimmons  <address@hidden>

        * java/awt/image/CropImageFilter.java
        (setPixels(int,int,int,int,ColorModel,byte[],int,int)): Set
        consumer pixels at 0, 0 location.
        (setPixels(int,int,int,int,ColorModel,int[],int,int)): Likewise.

Index: java/awt/image/CropImageFilter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/image/CropImageFilter.java,v
retrieving revision 1.9
diff -u -r1.9 CropImageFilter.java
--- java/awt/image/CropImageFilter.java 21 Aug 2005 03:11:23 -0000      1.9
+++ java/awt/image/CropImageFilter.java 2 Sep 2005 18:45:45 -0000
@@ -133,7 +133,7 @@
            }
            
            if (consumer != null)
-             consumer.setPixels(bounds.x, bounds.y,
+             consumer.setPixels(0, 0,
                                 bounds.width, bounds.height,
                                 model, cropped, 0, bounds.width);
        }
@@ -174,7 +174,7 @@
            }
            
            if (consumer != null)
-             consumer.setPixels(bounds.x, bounds.y,
+             consumer.setPixels(0, 0,
                                 bounds.width, bounds.height,
                                 model, cropped, 0, bounds.width);
        }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]