Halftone QR Codes
A QR code with a photograph printed into its dots. The data stays in the centre of each module, and the rest comes from your image. Everything runs in this browser, so the picture never leaves your device.
The method comes from Roman Tsukanov's halftone QR codes (MIT). Each module is a 3 × 3 block: the middle cell is the code, the eight around it are the photo.
Halftone codes are less forgiving than plain ones. Test the download with a phone camera before you print it.
How the photo gets in
Each QR module is drawn as a 3 × 3 block. The middle cell is the module itself, dark or light. The eight cells around it come from the photo. Finder patterns, timing lines, alignment patterns and format data stay solid, so a scanner can still find and read the code.
The image is sampled at cell size, adjusted for brightness and contrast, then reduced to two levels with your chosen dither. That result is composed with the QR grid. The preview and the download share the same grid, so the PNG or SVG is exactly what you see here.
Turn on Keep the photo's colours and the image keeps its RGB values at the same cell size instead of being dithered. The module centres and the finder, timing and format patterns stay solid ink and paper. Photo colours leave the scanner less margin, so test the download before printing.
Scan tips
Use a short link, keep the quiet zone, and keep the ink darker than the paper. Print or display the code at a decent size, at least a few centimetres across. If a phone struggles, raise the error correction to H, increase the contrast, or use a simpler photo with larger areas of light and dark.
The scan check uses the browser's built-in BarcodeDetector. Chrome and Chromium browsers usually have it; Safari and Firefox do not. When it is unavailable the button says so, and you can still test the download with a phone camera.
Credits
Halftone method: Roman Tsukanov, MIT. QR encoding: Kazuhiko Arase, MIT. License copies are in halftone-qr.txt and qrcode-generator.txt. The sample landscape is drawn in the page, not a stock photo.