static bool imagesIdentical_slow(BufferedImage img1, BufferedImage img2) { if (img1 == null) ret img2 == null; if (img2 == null) false; int w = img1.getWidth(), h = img1.getHeight(); if (w != img2.getWidth() || h != img2.getHeight()) false; for y to h: for x to w: if (img1.getRGB(x, y) != img2.getRGB(x, y)) false; true; }