TP3
This commit is contained in:
@@ -21,7 +21,7 @@ public class LectureFichier {
|
||||
for (String info : infosTab) {
|
||||
System.out.println(info);
|
||||
}
|
||||
this.image = new BufferedImage(Integer.parseInt(infosTab[0]), Integer.parseInt(infosTab[1]), BufferedImage.TYPE_3BYTE_BGR);
|
||||
this.image = new BufferedImage(Integer.parseInt(infosTab[1]), Integer.parseInt(infosTab[2]), BufferedImage.TYPE_3BYTE_BGR);
|
||||
|
||||
char[] caracteres = new char[15];
|
||||
Color[] couleurs = new Color[15];
|
||||
@@ -46,7 +46,7 @@ public class LectureFichier {
|
||||
String ligne = lecture.readLine().replaceAll("\"", "");
|
||||
ligne = ligne.substring(0, ligne.length()-1);
|
||||
|
||||
for (int j = 0; j != ligne.length(); j++) {
|
||||
for (int j = 0; j != Integer.parseInt(infosTab[0]); j++) {
|
||||
for (int k = 0; k != caracteres.length; k++) {
|
||||
if (caracteres[k] == ligne.charAt(j)) {
|
||||
this.image.setRGB(i, j, couleurs[k].getRGB());
|
||||
|
Reference in New Issue
Block a user