QUOTE(WongGei @ Nov 13 2020, 11:02 AM)
» Click to show Spoiler - click again to hide... «
I think you got it wrong. QR code standard must be established first, not the program.
https://www.qrcode.com/en/about/standards.htmlIt has been approved in 1997, means more than 23 years ago. And the draft is probably even older.
Without a standard, there no guideline to follow, more people just create more chaos.
If you wish to make a improved version of it, still, start from the current standard and improve it from there.
There are many library for the current standard, and you should start from there.
Make your standard/code open (open source or open standard) , then ask others to give comment or dive in.
Hi WongGei and everyone else.
I have created the repo on GitHub:
https://github.com/win32app/qrcliOriginal output directly from console window which supposed to be scanned and read as "Codemaster LYN", but no, it is not working.

I edited the white background to make it high intensity: (also not working)

Maybe this time someone can help with error correction codes? I cannot find what is example ECC for EC Level = Low (7 bytes) in v1 QR code.
Is this correct?
CODE
rs_init_gf(285);
rs_init_code(7,0);
rs_encode(14,@data[0],@ecc[0]);
rs_free;
QUOTE
The QR code specification says to use byte-wise modulo 100011101 arithmetic (where 100011101 is a binary number that is equivalent to 285 in decimal).
rs_init_code accept paramaters:
CODE
procedure rs_init_code(nsym: Integer; index: Integer);
So I just set the nsym to 7 chars?
And PByte is pointer to byte array:
CODE
procedure rs_encode(len: Integer; data: PBYTE; res: PBYTE);
Is it okay to set the len to length of string to be encoded, or must include the final 7 bytes of error correction codes as well? i.e. 14 + 7, or just 14 (maximum length accepted by my program)
v1 (21x21) accepts 17 binary chars (regardless of uppercase + lowercase letter , alphanumeric, all symbols)
And EC low is 7 bytes. Masking pattern is every two row (i.e. black = 0, white = 1, then following row black = 1, white = 0, and repeats)
If the data is "Codemaster LYN", the code will generate ECC=196 176 115 55 211 250 0. Is this correct?
Any input is most welcomed!
This post has been edited by mentalhealth.my: Nov 14 2020, 11:23 AM