Creating Your Own Image Format in the Browser
summary
Builds an encrypted image format (.e.png) that gets converted to a normal PNG on the fly using a Service Worker fetch hook and respondWith, decrypts with the Web Crypto API (AES‑CTR), and replaces buffering with a TransformStream streaming decryption so the browser can render without holding the whole file. Demo runs on Glitch, handles large images (~20 MB) by decrypting chunks as they arrive, and proves the approach is functional and reasonably performant.
AI-written summary · about
chapters (9)
- 0:00Introduction to custom image formats
- 2:10Why create custom image formats
- 6:00High-level approach overview
- 7:45Service Worker basics for polyfills
- 12:25Web Crypto API fundamentals
- 15:31Optimizing with streaming decryption
- 19:07Transform streams deep dive
- 24:25Future possibilities with web tech
- 26:53Closing and call to experiment
