كود
File f = new File("c:\images\myimage.gif");
BufferedImage image= ImageIO.read(f);
int rgb = image.getRGB(x, y);
int alpha = ((rgb >> 24) & 0xff);
int red = ((rgb >> 16) & 0xff);
int green = ((rgb >> 8) & 0xff);
int blue = ((rgb ) & 0xff);
// Manipulate the r, g, b, and a values.
rgb = (a << 24) | (r << 16) | (g << 8) | b;
image.setRGB(x, y, rgb);