Engineering notes
Make each intermediate step visible
The pipeline starts with colour conversion and 8 × 8 blocks, then exposes the discrete cosine transform, quantization, zig-zag ordering and entropy coding. The quality control re-encodes the image so the inspected values change with the output.
Use the same values for the interface and the file
A first pass collects coefficients and symbol frequencies. A second pass writes the JPEG using Huffman tables derived from those frequencies. The inspector reads the same data that the encoder uses, all inside the browser.
Check the bytes with a separate decoder
The project includes round-trip tests using jpeg-js. The file inspector also exposes the marker segments so visitors can trace how the tables and compressed data are laid out.
