public ImageBuilder getSubset(final int x, final int y, final int w, final int h) {
        checkBounds(x, y, w, h);
        final ImageBuilder b = new ImageBuilder(w, h, hasAlpha, isAlphaPremultiplied);
        for (int i = 0; i < h; i++) {
            final int srcDex = (i + y) * width + x;
            final int outDex = i * w;
            System.arraycopy(data, srcDex, b.data, outDex, w);
        }
        return b;
    }
Gets a subset of the ImageBuilder content using the specified parameters to indicate an area of interest. If the parameters specify a rectangular region
that is not entirely contained within the bounds defined by the ImageBuilder, this method will throw a RasterFormatException. This run- time exception is
consistent with the behavior of the getSubimage method provided by BufferedImage.

@param x the X coordinate of the upper-left corner of the specified rectangular region
@param y the Y coordinate of the upper-left corner of the specified rectangular region
@param w the width of the specified rectangular region
@param h the height of the specified rectangular region
@return a valid instance of the specified width and height.
@throws RasterFormatException if the specified area is not contained within this ImageBuilder
src/main/java/org/apache/commons/imaging/common/ImageBuilder.java