> Now if C is my central pixel (0,0), I should get back 3 Xs and C, however if I run
>the code below, I get back the wrong answer.
>
> applyKernel(0,0);
>
> public void applyKernel(int x, int y) {
> for(int i=-1; i<2; i++) {
> for(int j=-1; j<2; j++) {
> try {
> aBufferedImage.getRGB(i + x, j + y);
> System.out.println("Good");
> }
> catch(ArrayIndexOutOfBoundsException e) {
> System.out.println("Bad");
> }
> }
> }
> }
Scott,
What answer do you get back?? Does the ArrayIndexOutOfBoundsException get thrown when
you try to use getRGB with (-1,-1)?
-Mike Robinson
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".