All formats

BMP libraries for Python

Writing a 24-bit BMP by hand needs only the struct module: a 54-byte header and BGR rows padded to 4 bytes (see the file structure).