@Override
    public Dimension getImageSize(final ByteSource byteSource, final BmpImagingParameters params) throws ImagingException, IOException {
        final BmpHeaderInfo bhi = readBmpHeaderInfo(byteSource);

        return new Dimension(bhi.width, bhi.height);

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