Convert images to the uncompressed BMP format
The BMP (Windows Bitmap) format is one of the oldest and simplest image formats ever created. Unlike modern formats (JPEG, PNG, WebP) that use complex math and dictionaries to compress data, a BMP file is essentially just a giant, uncompressed array of raw pixels.
A BMP file starts with a small 54-byte header. This header tells the computer the exact width, height, and color depth of the image.
Immediately after the header, the file simply lists the exact Blue, Green, and Red byte values for every single pixel, usually scanning from the bottom-left of the image to the top-right.
Because there is absolutely no compression (like Deflate in PNG, or DCT in JPEG), a 1080p BMP image will always be exactly 6.2 Megabytes (1920 x 1080 x 3 bytes), even if the entire image is just a solid white square.
While this makes BMP terrible for internet bandwidth, its raw simplicity makes it the perfect format for embedded microcontrollers and legacy industrial systems that lack the CPU power to decompress complex modern formats.
Why does a 1080p BMP image of a solid white square have the exact same file size as a 1080p BMP image of a complex photograph?