-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
specify version 22 #186
Comments
Can you say more about the motivation for this? One challenge is that adding an explicit version would cause us to produce denser codes than are needed (e.g., if the information fits in a V20 symbol, it's undesirable to produce a V22 symbol). |
(See background at dvci/health-cards-walkthrough#4) |
hi @jmandel the reason I mention this v22 is the original spec at chunking section. Here is the quote:
I'm not an expert of raw qrcode concept, however I agree with you that V22 should be an upper bound but I assume the default version of node qrcode is the latest edition v40 maybe? |
You're right, v22 is an upper bound, which we tried to call out with this sentence:
We could provide more guidance here. Most implementations use the default error correction level and see which QR version this fits in. Only once you start bumping against v22 you should consider lowering the error correction level. |
@p2-apple Don't we prefer high error correction level when qr version is fixed? My understanding is this routine:
|
It depends a lot on what the QR code is used for. These levels are more important for physical reproductions of QR codes (i.e. printed somewhere) where the print may degrade (e.g. crumpled paper, abrasions). The higher two levels Q and H are generally only necessary when it is expected that the code will be damaged, the lower two (L and M) can correct for less damage. So, you only need to bump up error correction when you actually expect damage to a QR code, for codes shown on e.g. a phone screen with a high enough resolution that is not necessary. The algorithm I would propose:
|
It might not belong in the spec itself, but would it be helpful to record how the 1195 JWS character limit was determined along with guidance for capacities supported at other error correction level in a wiki or FAQ? I know I've seen it before, but I couldn't find it here or on Zulip so I attempted to go through it again here: JWS Characters for V22 QR at Various Error Correction Levels
A single, non-chunked Version 22 SMART Health Card QR contains two segments
* The first Byte mode segment (`shc:/`) always has 20 header bits and 40 data bits for a total of 60 bits.[1](https://www.nayuki.io/page/optimal-text-segmentation-for-qr-codes)
* The second segment (the numeric encoded QR code) always has 16 header bits and a variable number of data bits depending on the QR code length.[1](https://www.nayuki.io/page/optimal-text-segmentation-for-qr-codes)
The max JWS size that can fit in a single Version 22 QR code depends on the remaining space, which depends on the error correction used. 76 bits are already reserved for the required segment headers and
Each JWS character is encoded into two numeric characters (As described in Encoding Chunks as QR codes) Thus we can determine the maximum JWS size for each error correction with the following: JWS Size The results of the above rounded down to the nearest integer number of characters gives:
References: @jmandel where did I mess up 🙂 ? |
This looks great -- Mayne let's record it as a file in the FAQ directory, and we can link to it from the spec? |
Can we specify the version is 22?
{ type: 'svg', errorCorrectionLevel: 'low', version: 22 }
health-cards/generate-examples/src/index.ts
Line 206 in 364a001
The text was updated successfully, but these errors were encountered: