QR ECC level bug
See original GitHub issueSetting error correction level for QR code with function forBits has first bit reversed. So with numbers (0, 1, 2, 3) instead (L, M, Q, H) is (M, L, H, Q). Not big deal, but good to know.
BarcodeWriter writer = new BarcodeWriter();
writer.Options = new QrCodeEncodingOptions()
{
Width = 100,
Height = 100,
ErrorCorrection = ErrorCorrectionLevel.forBits(codeQR.eccLevel) //FIX: codeQR.eccLevel^1
};
writer.Format = BarcodeFormat.QR_CODE;
Bitmap QRcode = writer.Write(code);
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Error correction feature | QRcode.com | DENSO WAVE
QR Code has error correction capability to restore data if the code is dirty or damaged. Four error correction levels are available for...
Read more >QR Code Error Correction - QRStuff.com
There are 4 error correction levels used for QR codes, with each one adding different amounts of "backup" data depending on how much...
Read more >QR Code Error Correction | qrd°by
Error correction helps, that a QR Code stays readable, even if some pixels are missing. You can choose between 4 different levels of...
Read more >An overview of QR code error correction feature
Level L. This is the lowest level of error correction rate that a QR code can have. QR code software uses this level...
Read more >QR error correction helps and hinders scanning
A QR code can use one of four error correction levels. Higher error correction forces denser codes, but allows scanning in more situations....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Martin12350 - note - per wikipedia: dark is 0 on even rows and 1 on odd rows
So
L = [dark, dark]
T
is not00
I guess.No library will generate the bits 00 for L (or else it’s wrong). Source code might use constants 0-3 for L,M,H,Q internally, but that would be unrelated to its bit encoding.
To be clear, you will never be able to visually read off the information bits in a QR code. Everything is error-corrected, masked, or both. While EC level is encoded as 2 bits logically, there are no 2 modules on a QR code you can look at to read it as a human. In particular, EC+format info is 5 bits that’s actually encoded with BCH with an additional 15 bits of correction.