private Rectangle checkForSubImage(final TiffImagingParameters params) {
        // the params class enforces a correct specification for the
        // sub-image, but does not have knowledge of the actual
        // dimensions of the image that is being read. This method
        // returns the sub-image specification, if any, and leaves
        // further tests to the calling module.
        if (params != null && params.isSubImageSet()) {
            final int ix0 = params.getSubImageX();
            final int iy0 = params.getSubImageY();
            final int iwidth = params.getSubImageWidth();
            final int iheight = params.getSubImageHeight();
            return new Rectangle(ix0, iy0, iwidth, iheight);
        }
        return null;
    }
Constructs a new instance with the big-endian byte order.
src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java