i am trying to read number of image files and i want to compare them with each other. I have created an array object of size 5 and assigned 5 images to it. I tried to compare each images by passing array object to method. But it shows me an error. Can anyone help me?
File[] f= new File[5];
f[1]= new File("p1.png");
f[2]= new File("p2.png");
f[3]= new File("p3.png");
f[4]= new File("p4.png");
f[5]=new file("p5.png");
for(int i=1;i<5;i++)
{
compare(f[i],f[i++]);
}
public void compare(File fi[1],File fi[2])
{
BufferedImage image = ImageIO.read(fi[1]);
int width = image.getWidth(null);
int height = image.getHeight(null);
int[][] clr= new int[width][height];
BufferedImage images = ImageIO.read(fi[2]);
int widthe = images.getWidth(null);
int heighte = images.getHeight(null);
int[][] clre= new int[widthe][heighte];
}