BMP to WebP encoder
Convert an uncompressed BMP to lossy or lossless WebP locally in your browser.
Three statically linked QIP components cover opaque photos, lossy transparency,
and exact lossless pixels; the image is not uploaded.
All three components accept at most 25,000,000 pixels and 8192 pixels on either
side. Opaque mode accepts 24-bit BI_RGB, 32-bit BI_RGB BGRX, and explicitly
masked V5 BGRA; declared alpha is flattened over the selected background.
The alpha-preserving modes require 32-bit pixels. Opaque lossy mode is the
better default for photographs, while lossless mode is intended for pixels
that must round-trip exactly. Resize larger camera originals before encoding.
The worker is discarded after every encode. This releases its fixed Wasm
memory instead of keeping a 448 MiB, 1.1875 GiB, or 1.5 GiB instance attached
to the page.
Components #
CLI equivalent #
qip run components/image/bmp/bmp-to-webp-lossy-opaque.wasm \
'?quality=95&method=4&sharp_yuv=1&low_memory=1&background_color=0xffffff' \
< input.bmp > output.webp
qip run components/image/bmp/bmp-to-webp-lossy.wasm \
'?quality=95&method=4&sharp_yuv=1&low_memory=1' \
< input.bmp > output.webp
qip run components/image/bmp/bmp-to-webp-lossless.wasm '?level=6' \
< input.bmp > output.webp