public boolean checkBounds(final String name, final int min, final int max, final int actual) throws ImagingException {
        if (actual < min || actual > max) {
            addComment(name + ": " + "bounds check: " + min + " <= " + actual + " <= " + max + ": false");
            return false;
        }

        return true;
    }
Provides information about the compliance of a specified data source (byte array, file, etc&#46;) to an image format.
src/main/java/org/apache/commons/imaging/FormatCompliance.java