Which BMP type do I need?
“BMP” covers several layouts, and devices that read BMP often accept only one. Pick the one your manual, library or program names; when nothing is named, choose 24-bit.
| Type | Use it for | Transparency |
|---|---|---|
| 24-bit colour | The kind most often asked for, and the safe default. Adafruit’s image reader and the Arduino TFT library load 24-bit BMPs, and the HackBGRT boot logo tool asks for exactly a 24-bit BMP with a 54-byte header, which is what this page writes. | No: transparent areas get your background colour |
| 32-bit with transparency | Programs that read alpha, for example game sprites loaded with SDL2. Windows’ own imaging component reads the transparency from this kind of file from Windows 8 on. | Yes, in an alpha channel |
| 8-bit greyscale | Devices that ask for 256 shades of grey (one e-reader’s power-off logo needs exactly this), at a third the size of 24-bit. | No |
| 8-bit, 256 colours | Programs that ask for an indexed (palette) BMP, such as a 256-colour image for an old game. | No |
| 1-bit black and white | Black-and-white screens and printers: Adafruit’s image reader loads 1-bit BMPs for e-ink displays, and some receipt-printer logo tools ask for a monochrome BMP. Each pixel is black or white. | No |
Every file is written the classic way that strict readers expect: uncompressed, rows stored bottom-up, each row padded to a multiple of 4 bytes, and, except for 32-bit, the original 40-byte header (54 bytes with the file header). The 32-bit kind needs the newer V5 header to say where the alpha is. We checked our files: ImageMagick read the 24-, 8- and 1-bit ones as the classic “BMP3” type and the 32-bit one as a newer BMP with an alpha channel, and Windows’ own decoders (GDI+ and WIC) opened all of them, WIC reading the 32-bit file with its transparency.
Does BMP support transparency?
Only the 32-bit kind, and support is mixed. Windows’ imaging component ignores alpha in older 32-bit BMPs, because so many contain junk there, and reads it from Windows 8 on when the file uses the V5 header, as this page writes it. Many programs and small-display libraries do not read alpha, so check what yours accepts. For the other kinds, a transparent PNG is laid over a background colour you choose, white unless you change it; the page tells you which images have transparency.
How big will the BMP be?
BMP is not compressed, so its size depends only on the pixel count and the type, never on what the picture shows: a 1,920 × 1,080 image is 6,220,854 bytes as 24-bit whether it is a photo or a blank page. PNG compresses, so how much bigger the BMP is depends on the picture: in our tests an 800 × 322 logo went from a 38,238-byte PNG to a 772,854-byte 24-bit BMP, about 20 times larger, but a 1,600 × 1,199 photo only from 3,809,238 to 5,755,254 bytes, about 1.5 times. The converter shows each file’s BMP size before you convert, exactly (for 8-bit colour, the most it can be). These sizes come from the same code:
| Pixels | 24-bit colour | 32-bit with transparency | 8-bit greyscale | 1-bit black and white |
|---|---|---|---|---|
| 1,920 × 1,080 | 6,220,854 bytes | 8,294,538 bytes | 2,074,678 bytes | 259,262 bytes |
| 800 × 480 | 1,152,054 bytes | 1,536,138 bytes | 385,078 bytes | 48,062 bytes |
| 296 × 128 | 113,718 bytes | 151,690 bytes | 38,966 bytes | 5,182 bytes |
| 128 × 64 | 24,630 bytes | 32,906 bytes | 9,270 bytes | 1,086 bytes |
The arithmetic: each row takes width × bits per pixel, rounded up to whole 4-byte words (a 10-pixel row of 24-bit colour is 30 bytes, stored as 32), times the height, plus the headers and, for 8- and 1-bit, a colour table. At 1-bit the same full-HD image is 259,262 bytes.
Black and white (1-bit) BMP
A 1-bit BMP has two colours, so every pixel is cut to black or white at a brightness you set (128 of 255 by default). Text, logos and line art come out cleanest with a plain cut-off; for photos, tick dither, which uses patterns of dots to stand in for greys. To compare the cut-off and dithering side by side first, use the black and white image converter.
Is converting to BMP lossless?
For 24-bit, yes for every visible colour, though transparency becomes the background colour: we converted a photo (1,600 × 1,199) and a transparent logo (800 × 322) in Chrome and compared every pixel with the PNG using ImageMagick; both matched exactly, the logo laid over white. At 32-bit the photo matched exactly too. In the logo, opacity and every solid pixel matched, and 7,440 of its partly transparent edge pixels shifted in colour by at most 0.96 of 255 levels as they appear on screen, from how browsers store transparency while drawing. Converting cannot restore anything a JPG already lost, and 8- and 1-bit reduce the colours by design. Colour profiles and metadata are not carried over.
Other ways to make a BMP
- Windows Paint: open the image, then File › Save as › BMP picture.
- On a Mac or a phone: this page runs in a web browser, so you need no app.
- ImageMagick:
magick in.png BMP3:out.bmpforces the classic header that strict devices need; plainout.bmpmay write a newer one.
Why nothing is uploaded
The HTML standard requires browsers to save a canvas as PNG and lets them offer other types; asked for BMP, Chrome hands back a PNG. So this page decodes your image in the browser and writes the BMP with its own code, byte by byte, on your device. The images never leave it.