Is it possible to iterate through multiple image files? For example, given the following code, iterate through "someImage.jpg" to someImage20.jpg"? I still want the code following the BufferedImage to execute for each image of course.
BufferedImage image = ImageIO.read(new File("someImage.jpg"));
for(int x = 0; x < image.getWidth(); x++)
for(int y = 0; y < image.getHeight(); y++) {
int color = image.getRGB(x, y);
int alpha = (color & 0xff000000) >> 24;
int red = (color & 0x00ff0000) >> 16;
int green = (color & 0x0000ff00) >> 8;
int blue = color & 0x000000ff;
ch[red / 128][green / 128][blue / 128]++;