src/nl/knokko/gui/testing/GuiTestHelper.java
/**
	 * Checks if two buffered images are equal. Two buffered images are considered
	 * equal if the following 3 conditions hold: The width of image1 is equal to the
	 * width of image2. The height of image1 is equal to the height of image2. The
	 * pixel at any location on image1 has the same color as the pixel on the same
	 * location at image2 (the red, green, blue and alpha components are all equal).
	 * 
	 * @param image1 An image to compare with the other image
	 * @param image2 The other image
	 * @return true if the images are equal, false if they are different
	 */
Checks if two buffered images are equal. Two buffered images are considered
equal if the following 3 conditions hold: The width of image1 is equal to the
width of image2. The height of image1 is equal to the height of image2. The
pixel at any location on image1 has the same color as the pixel on the same
location at image2 (the red, green, blue and alpha components are all equal).

@param image1 An image to compare with the other image
@param image2 The other image
@return true if the images are equal, false if they are different
Checks if two buffered images are equal . Two buffered images are considered equal if the following 3 conditions hold : The width of image1 is equal to the width of image2 . The height of image1 is equal to the height of image2 . The pixel at any location on image1 has the same color as the pixel on the same location at image2 ( the red green blue and alpha components are all equal ) . @param image1 An image to compare with the other image @param image2 The other image @return true if the images are equal false if they are different
public boolean compareImages(BufferedImage image1, BufferedImage image2) {
		if (image1.getWidth() != image2.getWidth() || image1.getHeight() != image2.getHeight()) {
			return false;
		}
		int width = image1.getWidth();
		int height = image1.getHeight();
		for (int x = 0; x < width; x++) {
			for (int y = 0; y < height; y++) {
				if (image1.getRGB(x, y) != image2.getRGB(x, y)) {
					return false;
				}
			}
		}
		return true;
	}
public boolean compareImages ( BufferedImage image1 , BufferedImage image2 ) { if ( image1 . getWidth ( ) != image2 . getWidth ( ) || image1 . getHeight ( ) != image2 . getHeight ( ) ) { return false ; } int width = image1 . getWidth ( ) ; int height = image1 . getHeight ( ) ; for ( int x = 0 ; x < width ; x ++ ) { for ( int y = 0 ; y < height ; y ++ ) { if ( image1 . getRGB ( x , y ) != image2 . getRGB ( x , y ) ) { return false ; } } } return true ; }
Checks if two buffered images are equal.
Checks if two buffered images are equal .