1for (int y = 0; y < image.getHeight(); y++) {
2 for (int x = 0; x < image.getWidth(); x++) {
3 int clr = image.getRGB(x, y);
4 int red = (clr & 0x00ff0000) >> 16;
5 int green = (clr & 0x0000ff00) >> 8;
6 int blue = clr & 0x000000ff;
7 image.setRGB(x, y, clr);
8 }
9}