
PNG to BMP
Write a PNG as an uncompressed 32-bit BMP. The output is width times height times four bytes plus a 54-byte header, whatever the picture holds.
PNG to BMP writes rows of raw pixels under a 54-byte header, so the size of the output follows from the dimensions alone. A 600 by 600 picture lands at 1,440,054 bytes whether it holds a photograph or a blank square. Nothing this encoder writes is compressed, and no option here changes that.
Questions
Is this conversion lossy?
No. BMP here is written as an uncompressed 32-bit bitmap, so every pixel the PNG had, color and alpha both, is copied across exactly with no compression at all.
What is lost?
Nothing in the picture, only file size efficiency, since BMP applies no compression where PNG applied lossless compression. Metadata the PNG carried does not survive, the same as every pair in this matrix.
Which engine handles this?
A dedicated BMP encoder in this codebase writes the uncompressed bitmap after jSquash decodes the source PNG. Both run in Node, on the command line, through MCP and in the browser.
What size should I expect?
Exactly width times height times four bytes plus a 54-byte header, regardless of what the picture shows, since there is no compression to shrink simple images. This is usually several times larger than the source PNG.
What is the reverse page?
BMP to PNG runs the opposite direction and shrinks the file back down by compressing losslessly, with no change to the picture either way.