Salut,
j'aimerais parcourir mon image pixel par pixel en effectuant un test mais je suis coince avec une exception :
alors elle me génère cette exception:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 width=img.getWidth();//Recuperation de la largeur de l'image height=img.getHeight(); for(int i=0;i<height;i++) { for(int j=0;j<width;j++) { if(img.getRGB(i,j)==-1) { corx.add(v,new Integer(i)); cory.add(v,new Integer(j)); v++; } } }
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.IntegerInterleavedRaster.getDataElements(IntegerInterleavedRaster.java:202)
Partager