public BufferedImage getBufferedImage(final InputStream inputStream, final BmpImagingParameters params) throws ImagingException, IOException {
        final BmpImageContents ic = readImageContents(inputStream, FormatCompliance.getDefault());

        final BmpHeaderInfo bhi = ic.bhi;
        // byte[] colorTable = ic.colorTable;
        // byte[] imageData = ic.imageData;

        final int width = bhi.width;
        final int height = bhi.height;

        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("width: " + width);
            LOGGER.fine("height: " + height);
            LOGGER.fine("width*height: " + width * height);
            LOGGER.fine("width*height*4: " + width * height * 4);
        }

        final AbstractPixelParser abstractPixelParser = ic.abstractPixelParser;
        final ImageBuilder imageBuilder = new ImageBuilder(width, height, true);
        abstractPixelParser.processImage(imageBuilder);

        return imageBuilder.getBufferedImage();

    }
Constructs a new instance with the little-endian byte order.
src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java