Illustration with a transparent corner
- Input
- sample.png, 1200×800 RGBA, 20,828 bytes, with a transparent triangle in the top-left corner.
- Output
- 2,880,054-byte 24-bit BMP in 23 ms; the corner is solid white and everything else is pixel-identical.
PNG → BMP writes an uncompressed 24-bit bitmap, which is why a 20 KB PNG turns into a 2.8 MB BMP and why alpha has to be flattened first.
From real runs
| Element | Result | What happens |
|---|---|---|
| Pixels | Kept | Every opaque pixel of the 1200×800 sample was written unchanged; BMP is lossless. |
| Transparency | Changed | The PNG's 16,373 transparent pixels were composited onto white (the background option), so the transparent corner became a white corner. |
| Bit depth | Changed | The BMP is 24-bit RGB with no alpha plane; 32-bit BMP with alpha is not produced. |
| File size | Changed | 20,828 bytes of PNG became 2,880,054 bytes: 1200×800×3 bytes of raw pixels plus a 54-byte header, with no compression. |
| Metadata | Lost | PNG text chunks, gamma and ICC data have no place in a BMP and are dropped. |
| Dimensions and orientation | Kept | Width and height are unchanged; the file is written bottom-up as Windows expects and every viewer shows it upright. |
Every opaque pixel of the 1200×800 sample was written unchanged; BMP is lossless.
The PNG's 16,373 transparent pixels were composited onto white (the background option), so the transparent corner became a white corner.
The BMP is 24-bit RGB with no alpha plane; 32-bit BMP with alpha is not produced.
20,828 bytes of PNG became 2,880,054 bytes: 1200×800×3 bytes of raw pixels plus a 54-byte header, with no compression.
PNG text chunks, gamma and ICC data have no place in a BMP and are dropped.
Width and height are unchanged; the file is written bottom-up as Windows expects and every viewer shows it upright.
We converted our PNG sample (20 KB) with Image engine on 2026-10-20. It took 54 ms and produced a 2.7 MB BMP file, 138× larger than the input. The engine raised 1 warning, listed below.
Input · sample.png · 20 KB
1200 × 800 px, 8-bit, colour type 6
Output · sample.bmp · 2.7 MB
1200 × 800 px, 24-bit
Pillow
from PIL import Image
img = Image.open("in.png").convert("RGBA")
bg = Image.new("RGBA", img.size, "#ffffff")
bg.alpha_composite(img)
bg.convert("RGB").save("out.bmp")Saving RGBA directly writes a 32-bit BMP that many Windows tools misread; flatten first.
ImageMagick
magick in.png -background white -flatten -type TrueColor BMP3:out.bmpBMP3 avoids the newer header variants some old software rejects.
The HTTP API and the MCP server run the exact engine this page uses (Image engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=png&to=bmp.
curl -X POST https://filetypeconverters.com/api/v1/convert \
-H "Authorization: Bearer $FTC_API_KEY" \
-F "file=@input.png" -F "from=png" -F "to=bmp" \
-F 'options={"dpi":96}' \
--output output.bmp| Key | Applies to | Type | Default |
|---|---|---|---|
| dpi | Reading PNG | number | 96 |
| width | Writing BMP | number | 0 |
| height | Writing BMP | number | 0 |
| fit | Writing BMP | contain · cover · fill | contain |
| quality | Writing BMP | number | 90 |
| background | Writing BMP | string | #ffffff |
| stripMetadata | Writing BMP | boolean | true |
BMP stores three uncompressed bytes per pixel. 1200×800 pixels is 2,880,000 bytes before the 54-byte header, however simple the picture; PNG compressed the same flat colours to 20,828 bytes.
They are filled with the background colour, white unless you set another. BMP as written here has no alpha channel to keep them transparent.
24-bit true colour. Palette-based 8-bit BMPs are not produced; convert with a tool that supports -colors if a legacy program insists on one.