private void processTestSet(final String[] testSet) throws IOException {
        final File masterFile = getTiffFile(testSet[0]);
        final BufferedImage masterImage = Imaging.getBufferedImage(masterFile);
        final int w = masterImage.getWidth();
        final int h = masterImage.getHeight();
        final int[] masterArgb = new int[w * h];
        masterImage.getRGB(0, 0, w, h, masterArgb, 0, w);

        final int[] masterGray = new int[w * h];
        for (int i = 0; i < masterArgb.length; i++) {
            masterGray[i] = gray(masterArgb[i]);
        }

        for (int iFile = 1; iFile < testSet.length; iFile++) {
            final String name = testSet[iFile];
            final File f = getTiffFile(name);
            final BufferedImage test = Imaging.getBufferedImage(f);
            final int testW = test.getWidth();
            final int testH = test.getHeight();
            assertEquals(w, testW, "Width mismatch for " + name);
            assertEquals(h, testH, "Height mismatch for " + name);

            final String label = "Pixel match for " + name;
            final int[] testArgb = new int[w * h];
            test.getRGB(0, 0, w, h, testArgb, 0, w);
            for (int i = 0; i < testArgb.length; i++) {
                final int testGray = gray(testArgb[i]);
                final int masterA = masterArgb[i] >>> 24;
                final int testA = testArgb[i] >>> 24;
                assertEquals(masterA, testA, 1, label);
                assertEquals(masterGray[i], testGray, 4, label);
            }
        }
    }
Process a set of files using the first name in the array as the master image and comparing all subsequent files against its content on a pixel-by-pixel
bases. The first name will usually be a TIFF file that is stored using a non-lossy compression format (something other than JPEG). All subsequent files
will use JPEG based compression with an alternate geometry (strips, tiles, etc.). Because JPEG is lossy, we define a match as values of pixels that
produce gray tones withing a threshold.

@param testSet an array of 2 or more TIFF file names
@throws IOException in the event of an unexpected I/O exception
src/test/java/org/apache/commons/imaging/formats/tiff/TiffJpegTest.java