v145 · Web APIs · Sniffer Probe

BMP embed sniffer probe

Upload (or pick a synthesised sample) a BMP file. We sniff the leading bytes to detect whether it embeds JPEG, PNG, or pure raster — and report whether Chrome 145 still decodes it.

probe

signature
compression
Chrome 145 supported?

If a BMP carries compression value 0x04 (JPEG) or 0x05 (PNG) in its DIB header, Chrome 145 refuses to decode it. Authors should re-encode such files as plain JPEG or PNG.

code

// Sniff the BMP DIB header at byte 30 for compression field.
const dv = new DataView(buf);
const sig = String.fromCharCode(dv.getUint8(0), dv.getUint8(1));  // 'BM'
const comp = dv.getUint32(30, true);                              // little-endian
const removed = (comp === 4 || comp === 5);                       // JPEG / PNG embed

see also