Affichage des pixels d'une image
Bonjour,
Quelqu'un saurait-il m'expliquer pourquoi mon IDE me souligne printPixelARGB(pixel); en rouge ?
Est-ce qu'il y a d'autres fonctions similaires ?
Voilà mon bout de code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12
| int w = image.getWidth();
int h = image.getHeight();
System.out.println("width, height: " + w + ", " + h);
int[] pixels = new int[w*h];
for (int k = 0; k < h; k++) {
for (int j = 0; j < w; j++) {
System.out.println("x,y: " + j + ", " + k);
pixels = image.getRGB(0, 0, w, h, pixels, 0, w);
printPixelARGB(pixels);
System.out.println(pixels+"\t");
}
} |
Merci d'avance pour votre aide.