I'm trying to make a Java code that compares an input image with other n already defined images in code. I developed (with a lot of) a similar code, which compared two images only, the problem is to magnify it. To take one image only and to compare with several others, I do not know how to do it.
What I have:
public static boolean compareImage(BufferedImage image1, BufferedImage image2){
if (image1.getWidth()!= image2.getWidth()|| image1.getHeight() != image2.getHeight()){
return(false);
}
for (int x=0; x<image1.getWidth(); x++){
for(int y=0; y<image1.getHeight(); y++){
if(image1.getRGB(x,y)!=image2.getRGB(x,y)){
return(false);