Identifying colors in a picture (new at java)

Hi everyone, it's been a while. Now onto the problem. I'm tring to reconize certain parts of a picture as what color they are is there a way for java to look in a picture and identify at as any pixel and say hey it's (22,33,45) color at this part? thanks
[278 byte] By [jpeanuta] at [2007-10-3 0:37:01]
# 1
I think the getPixelColor() method in the Robot class will work.
CaptainMorgan08a at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...
# 2
i have been trying to figure this out too. i found some robot class but it doesnt work any more. r u trying to do transparacy? because thats y i wanted to find pixle colors.
capratcheta at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...
# 3
perhaps you could use a java.awt.image.RGBImageFilter
paulcwa at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...
# 4
i'm just trying to go through a picture and identify say all the white parts so i can remove it. i tried using the robot class but it didn't work, do you guys know where i can find tutorial on getting pixel color in a picture ?
jpeenuta at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...
# 5
What do you mean by "remove it"? Do you mean you want to replace the pixel with a different color? Or make it transparent? Or something completely different?
paulcwa at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...
# 6

Here is some1's reply I found some time ago (Note img is of BufferedImage type) :

Code to extract pixel :

int pixel=img.getRGB(x,y);

This is the code to extract RGB values from the pixel :

red=(pixel>>16) & 0xff ;

green=(pixel>>8) & 0xff ;

blue=pixel & 0xff ;

To combine RGB values again to a pixel value :

pixel = 255<<24 | red<<16 | green<<8 | blue;

To place the pixel back on the image :

img.setRGB(x,y,pixel);

maf69a at 2007-7-14 17:30:51 > top of Java-index,Java Essentials,New To Java...