private void compareImages(final BufferedImage a, final BufferedImage b) {
        assertEquals(a.getWidth(), b.getWidth());
        assertEquals(a.getHeight(), b.getHeight());

        for (int x = 0; x < a.getWidth(); x++) {
            for (int y = 0; y < a.getHeight(); y++) {
                final int aArgb = a.getRGB(x, y);
                final int bArgb = b.getRGB(x, y);
                if (aArgb != bArgb) {
                    Debug.debug("width: " + a.getWidth());
                    Debug.debug("height: " + a.getHeight());
                    Debug.debug("x: " + x);
                    Debug.debug("y: " + y);
                    Debug.debug("aArgb: " + aArgb + " (0x" + Integer.toHexString(aArgb) + ")");
                    Debug.debug("bArgb: " + bArgb + " (0x" + Integer.toHexString(bArgb) + ")");
                }
                assertEquals(aArgb, bArgb);
            }
        }
    }
Generates the next combination of elements in the sequence array, with each element having a maximum value of max. Initially, the sequence should be set
to minimum values of each element.

@param sequence the array of elements to update
@param max      the maximum value of each element in the sequence
@return false if there is no more combinations (ie. nothing was done), true otherwise
src/test/java/org/apache/commons/imaging/formats/tiff/TiffCcittTest.java