Regressive JPEGs(maurycyz.com)
710 points by vitaut 54 days ago | 68 comments
tl;dr: Progressive JPEGs contain multiple "scans" that refine the image over time, and by concatenating multiple images while stripping certain markers, you can create a single JPEG that renders as different images over a slow network. Since decoders typically bail out after ~9 scans, the author works around this by using minimal DC-only scans (yielding 1/16 resolution frames) to pack up to 90 frames—effectively a video—into one standards-compliant JPEG. Playback timing depends entirely on network speed, so it's more of a novelty than a practical technique.
HN Discussion:
  • Similar hacks are possible with other formats like progressive PNG
  • ~Timing limitation can be worked around via server-side chunking or Service Workers
  • ~Practical applications exist, such as progress bars or steganography
  • Appreciation for the cleverness of the technique itself
  • Progressive JPEG in general has downsides like slower decoding and little visual value