News for hackers. Stuff that matters.
Re:Reading QR codes without a computer by NeoTar on Monday January 22, 2024 @06:27AM (#39088357)
Stupid 'trivia' question, but could someone generate the 'darkest' (most black pixels) and 'brightest (most white pixels) QR codes possible?
Re:Reading QR codes without a computer by lekevicius on Monday January 22, 2024 @06:30AM (#39088376)
It’s of course possible, but the spec is trying to avoid this. There are multiple “masking patterns”, and the algorithm should choose one that gives fewest “penalty points”. Large single color areas are a lot of penalty points, so QR algorithm is trying to avoid them.
Re:Reading QR codes without a computer by NeoTar on Monday January 22, 2024 @06:38AM (#39088415)
Yes - I think it would be interesting to see them actually produced. Could we get to 60% white pixels? Or 75%?

There could maybe be two solutions:

* Darkest/Brightest allowed by the QR algorithm,

* Darkest/Brightest technically valid, which would would not be chosen by the algorithm (i.e. if one manually chooses the masking pattern.

Perhaps also more solutions - 'Darkest/Brightest recognized by software X/Y/Z'

Re:Reading QR codes without a computer by Retr0id on Monday January 22, 2024 @07:05AM (#39088582)
An encoder should try to avoid them, but in theory it doesn't have to, right?
Re:Reading QR codes without a computer by lifthrasiir on Monday January 22, 2024 @07:14AM (#39088653)
Yeah, it's not mandatory. The specification itself recommends a very concrete algorithm though, and one of its criteria is literally the average density [1].

[1] https://github.com/lifthrasiir/qr.js/blob/52f0409a22c5ece6a5...

Re:Reading QR codes without a computer by creole_wither on Tuesday January 23, 2024 @09:53AM (#39104080)
Like this HDR QR Code that works on Apple devices?

https://notes.dt.in.th/HDRQRCode

Re:Reading QR codes without a computer by nayuki on Tuesday January 30, 2024 @12:24PM (#39192892)
I made an attempt on https://www.nayuki.io/page/creating-a-qr-code-step-by-step - use the examples "Force light area" and "Force dark area".