次のようなもの...それを機能させることを除いて:
public void seeBMPImage(String BMPFileName) throws IOException {
BufferedImage image = ImageIO.read(getClass().getResource(BMPFileName));
int[][] array2D = new int[66][66];
for (int xPixel = 0; xPixel < array2D.length; xPixel++)
{
for (int yPixel = 0; yPixel < array2D[xPixel].length; yPixel++)
{
int color = image.getRGB(xPixel, yPixel);
if ((color >> 23) == 1) {
array2D[xPixel][yPixel] = 1;
} else {
array2D[xPixel][yPixel] = 1;
}
}
}
}