Regressive JPEGs(maurycyz.com)
416 points by vitaut 8 hours ago | 42 comments
tl;dr: Progressive JPEGs store images as multiple "scans" of increasing detail, and by concatenating multiple images while stripping certain markers, you can create a single JPEG that displays different frames as it loads over a slow network. Since most decoders bail out after ~9 scans, the trick is to use minimal DC-only scans (yielding 1/16 resolution frames), which allows packing ~90 frames—enough for a crude video—into one standards-compliant JPEG. Playback timing depends entirely on network speed, so it has no real practical use beyond novelty demos like HTML-only video via `<dialog>` tags.
HN Discussion:
  • ~Timing can be controlled by server-side chunked delivery rather than pure network delay
  • Suggests practical applications like progress bars or steganography, countering the 'no practical use' claim
  • Pure appreciation of the hack's cleverness and execution
  • Progressive JPEGs are generally not worth the decoding slowdown in practice
  • Extension ideas like GIF-to-regressive-JPEG conversion