You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Without this, DIBs are read incorrectly: part of the color palette gets
mixed with the actual file data, and last bytes from the data get
completely lost.
I've sent a PR with a fix to the fork I use: wieslawsoltes#1. Still not sure what's the story with the fork and NuGet, though. I'm ready to send a PR to this repo as well if you want.
DeviceIndependentBitmap
currently doesn't take into account the color palette stored in the DIB, which makes the size calculation incorrect. Currently it reads:Data
But it should:
(header.ColorsUsed ?? 1 << header.BitCount) * 4
bytes intoColors
Data
Here's a compressed example of a file that reads incorrectly by the library: _bm0.zip.
The text was updated successfully, but these errors were encountered: