04:49 pm - sparkymark - Strange image comparison problem: X != X I am trying to compare two images and sometimes find one image does not match itself (or rather the images derived from a single JComponent do not match each other). For a fixed image the following code usually passes the test, but occasionally fails (assertEquals is JUnit function which fails the test if the arguments are not equal).**( CodeCollapse )**I am not doing this on the Swing thread but If I wrap it in SwingUtilities.invokeAndWait it does not help. I also tried turning off antialiasing on the code that generated the image on the component. Does anyone know if it is possible to reliably compare two BufferedImages from JComponents(or what I really want to do, compare an image from a JComponent against a BufferedImage read successfully from a file)?