Javafx how to check equality of images?
for (int i = 0; i < image1Width; i++)
{
for (int j = 0; j < image1Height; j++)
{
if (image1.getPixelReader().getColor(i, j) != image2.getPixelReader().getColor(i, j)) return false;
}
}
This is what I have at the moment. I pass the function two images (javafx.scene.image.Image). This means it should never return false when the images are the same. Unfortunately this returns false when I pass the same image to it.
Thank.
+3
source to share