private BufferedImage readImage(final WbmpHeader wbmpHeader, final InputStream is) throws IOException {
        final int rowLength = (wbmpHeader.width + 7) / 8;
        final byte[] image = readBytes("Pixels", is, rowLength * wbmpHeader.height, "Error reading image pixels");
        final DataBufferByte dataBuffer = new DataBufferByte(image, image.length);
        final WritableRaster raster = Raster.createPackedRaster(dataBuffer, wbmpHeader.width, wbmpHeader.height, 1, null);
        final int[] palette = { 0x000000, 0xffffff };
        final IndexColorModel colorModel = new IndexColorModel(1, 2, palette, 0, false, -1, DataBuffer.TYPE_BYTE);
        return new BufferedImage(colorModel, raster, colorModel.isAlphaPremultiplied(), new Properties());
    }
Constructs a new instance with the big-endian byte order.
src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java