Hacker News new | ask | show | jobs
by ape4 1247 days ago
But there are lots of BMP versions - wiki says "Many different versions of some of these structures can appear in the file, due to the long evolution of this file format."
1 comments

Exactly. It is easy to write a BMP reader, but if you want to read any BMP file that you might find in the wild then you're going to have a fun time.
There's even some very niche extensions to BMP which allow it to be used as a container for PNG or JPEG data.

https://learn.microsoft.com/en-us/windows/win32/gdi/jpeg-and...