stb icon indicating copy to clipboard operation
stb copied to clipboard

Fix reading bmp V3 info headers with `BI_BITFIELDS` compression

Open Cirras opened this issue 2 years ago • 1 comments

Previously these bitmaps would unconditionally discard all 4 bitmasks, then erroneously overread another 12 bytes if the compression was BI_BITFIELDS.

See attached BMP with BITMAPV3INFOHEADER and BI_BITFIELDS compression. It should be loaded properly by paint, and currently cause a "bad BMP" error in stb_image. v3_info_header_with_bitfields.zip

Cirras avatar Feb 09 '23 14:02 Cirras

Totally understand that the maintainers have their own priorities, but I'd really appreciate it if this one could be looked at and hopefully merged. It would allow me to remove some gnarly hacks in a LibGDX application that (indirectly) relies on sbt for loading bitmaps.

Cirras avatar Jan 23 '24 12:01 Cirras