2 ms·
BMP is really great, the whole format is described on wikipedia with enough detail to code it yourself in literally 10 minutes, and the 'hardest' part of creati
by ajsnigrutin 4y ago
BMP is really great, the whole format is described on wikipedia with enough detail to code it yourself in literally 10 minutes, and the 'hardest' part of creating (or parsing) a bmp is counting the bytes to pad the data correctly, and remembering where [0,0] is :)
https://en.wikipedia.org/wiki/BMP_file_format#Example_1 https://en.wikipedia.org/wiki/BMP_file_format#Example_1
- ape4 4y agoBut 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."
- Retr0id 4y agoExactly. 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.
- duskwuff 4y agoThere'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-png-extensions-for-specific-bitmap-functions-and-structures https://learn.microsoft.com/en-us/windows/win32/gdi/jpeg-and...