5 ms·
Hi HN! Inspired by a recent HN article on QR codes [0], I decided to finally publish [1] and open-source [2] a service I created 7 years ago. I got pulled away
by pickledcods 6y ago
Hi HN!
Inspired by a recent HN article on QR codes [0], I decided to finally publish [1] and open-source [2] a service I created 7 years ago. I got pulled away from it by projects with higher priority and it has been catching dust and been bitrot eroding since. Now reconstructed the basics and hosted on an AWS instance I would like to share so it might inspire.
Creating a photo realistic QR requires two steps. The first is to create a 93x93 dithered monochrome image. The dithering is calculated to preserve the mandatory QR framework/timing bits and keep the data/crc bits conforming. Trying to maximize the crc bits to match the original image.
The second step is adding colour information as a 186x186 dithered layer. The colour palette is created using Spacial Colour Quantification which uses the 93x93 QR image as constraints on the available colour range.
SCQ also stabilises palettes used for animations (a service not made available through the site yet).
[0] https://news.ycombinator.com/item?id=24119124
[1] https://www.qrpicture.com
[2] https://github.com/xyzzy/qrpicture
- detaro 6y agoCool idea. Sadly only the b/w example scans for me, and even that takes a while to register.
- jonathanlydall 6y agoAll work on my iPhone 6S.
- tln 6y agoSame, pixel 3. This is very cool tech but from a UX pov I think it's better codes small and pure (no logo or non-square dots)
- sp332 6y agoWhich app are you using?
- detaro 6y agoDefault Android camera app on my moto x4 and SecScanQR
- Jakob 6y agoGreat idea! Works flawlessly for me on an iPhone XR.
- aabbcc1241 6y agoThis is both fun and useful, great job