Java program to compare two images.