comparing pixels

Ok i have two ImageBuffers and i would like to compare each of the pixels in the ImageBuffers. How would i go about doing that? the robot class has getPixelColor but i dont want it to take it from the screen... and to use pixelgrabber seems too complicated and slow... any
[297 byte] By [hochia] at [2007-10-2 18:45:28]
# 1

> Ok i have two ImageBuffers and i would like to

Do you mean BufferedImages?

> compare each of the pixels in the ImageBuffers. How

> would i go about doing that? the robot class has

> getPixelColor but i dont want it to take it from the

> screen... and to use pixelgrabber seems too

> complicated and slow... any ideas?

If you are talking about BufferedImages you can use the method getRGB(int x, int y) to retrive the rgb value of the pixel at (x,y) and compare those between the images. You could also use getTile to retrieve Rasters and use those to compare.

dwga at 2007-7-13 20:07:58 > top of Java-index,Java Essentials,Java Programming...