public static boolean isEqual(BufferedImage newImage,
			BufferedImage previousImage) {
		boolean equal = true;

		if ((newImage != null) && (previousImage != null)) {
			DataBuffer newDb = newImage.getData().getDataBuffer();
			DataBuffer prevDb = previousImage.getData().getDataBuffer();

			for (int i = 0; (i < newDb.getSize()) && equal; i++) {
				if (newDb.getElem(i) != prevDb.getElem(i)) {
					return false;
				}
			}

		} else {
			equal = false;
		}

		return equal;
	}