About the JPG to BMP Converter
Test fixtures, image processing exercises and firmware pipelines often want pixels with no decoder in front of them. A bitmap gives exactly that: after 54 bytes of header the file is nothing but blue, green and red values in row order, which any language can read with a loop and a file handle. That is why teaching material for OpenCV, embedded displays and simple C programs keeps using BMP long after the format stopped being fashionable.
The conversion decodes the JPEG once, in the browser, and writes those decoded pixels straight out. Nothing is re-compressed, so the bitmap is a faithful record of what the JPEG decoder produced, artefacts included. The output is bulky by design, since three bytes per pixel with four byte row alignment is the whole storage scheme.
Use the Max width menu when the source is a 12 megapixel camera file, because the full size bitmap would be well over 30 megabytes and slower to move around than to regenerate. If you only need the picture in a smaller lossless container rather than raw pixels, JPG to PNG is the better call.
How to use
- Load the JPG from disk, clipboard or a drag from your file manager.
- Pick a Max width if the camera original is large.
- Download the bitmap and feed it to your program or test suite.
Common questions
- How big will the bitmap be?
- Roughly width times height times three bytes. A 4000 by 3000 photo lands near 36 megabytes.
- Are the JPEG artefacts removed?
- No. The bitmap records what the JPEG decoded to, so any blocking or ringing is copied faithfully.
- Which header does the file use?
- A 14 byte BITMAPFILEHEADER followed by a 40 byte BITMAPINFOHEADER, 24 bits per pixel, no compression.
- Will Python or C read it without a library?
- Yes. Skip to the pixel offset stored at byte 10 and read rows of BGR triples padded to four bytes.