JPEG Compression: Full-Image DCT Tiling & File-Size Estimate (2D)
A full-image, block-by-block JPEG-style compressor: every 8x8 tile of a generated grayscale image gets a real forward DCT, quantization at your chosen quality factor, and an inverse DCT. Compare original vs reconstructed side-by-side with a pixel-level loupe, and watch estimated file size, compression ratio and PSNR update live.
This simulator runs the real JPEG compression pipeline across an entire generated image rather than a single isolated block: every 8×8 tile gets its own forward Discrete Cosine Transform, its own quantization against the quality-scaled JPEG luminance step table, and its own inverse DCT to reconstruct the lossy result — then all 256 tiles are stitched back together so you see the compression behave the way it actually does on a photograph, including how neighbouring blocks interact visually at low quality. A live pixel loupe lets you zoom into any point on either the original or the reconstructed image to inspect blocking and ringing artefacts up close, while quality, estimated compressed file size, compression ratio and whole-image PSNR update in real time as you drag the slider. Five source patterns — landscape, portrait, text, fine checkerboard and random noise — make the point that DCT-based compression is highly content-dependent: smooth gradients collapse onto a handful of low-frequency coefficients and compress hugely, while noise and fine checkerboards spread energy across all 64 coefficients and barely compress at all.
Full-image, block-by-block JPEG-style compressor: every 8x8 tile of a generated grayscale image gets a real forward DCT, quantization at your chosen quality factor, and an inverse DCT, stitched back into a whole reconstructed image. Compare original vs compressed with a pixel-level loupe while estimated file size, compression ratio and PSNR update live.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install