stb
stb copied to clipboard
Fix reading bmp V3 info headers with `BI_BITFIELDS` compression
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
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.