Dithered QR Codes
- ID
- 12391
- Status
- summarized
- Published
- 09 Aug 2026, 7:05 AM
- Fetched
- 11 Aug 2026, 7:54 AM
- Provider
- Hacker News
- Category
- dev-community
- Original URL
- https://www.andrewt.net/dithered-qr-codes/wtf/
- Source URL
- https://hnrss.org/best
Summary
- Score
- 4.0
- Created
- 11 Aug 2026, 9:00 AM
- Tags
- Audience
- developersvibe_coders
What happened
Andrewt.net explains how to create visually distinctive QR codes by modifying data modules while preserving function patterns, then applying Floyd-Steinberg error diffusion dithering to embed low-res images into the code. The technique exploits QR's built-in error correction: shrink each data module to a 3x3 grid center, use surrounding cells for image data, and dither the result for midtones instead of crude thresholding.
Why it matters
If you ship QR codes in marketing or packaging, this explains the tradeoff between visual customization and scan robustness, and gives a concrete method (3x3 grid + error diffusion) you can prototype. For most builders this is a curiosity, not a production decision.
Discussion angle
Where's the line between a scannable branded QR code and one that fails on cheap phone cameras in poor lighting — and is the aesthetic payoff worth the support cost?