DeviceIndependentBitmap currently doesn't take into account the color palette stored in the DIB, which makes the size calculation incorrect. Currently it reads:
- read 40-byte header
- read (seemingly properly calculated amount of) data bytes into
Data
But it should:
- read 40-byte header
- read
(header.ColorsUsed ?? 1 << header.BitCount) * 4 bytes into Colors
- read same amount of data into
Data
Here's a compressed example of a file that reads incorrectly by the library: _bm0.zip.
DeviceIndependentBitmapcurrently doesn't take into account the color palette stored in the DIB, which makes the size calculation incorrect. Currently it reads:DataBut it should:
(header.ColorsUsed ?? 1 << header.BitCount) * 4bytes intoColorsDataHere's a compressed example of a file that reads incorrectly by the library: _bm0.zip.