QROCDE/UPNQR: add FAST_MODE (try 4 not 8 masks automatically)

This commit is contained in:
gitlost 2022-12-05 10:11:36 +00:00
parent 5499e9d71f
commit ad1b091ed1
18 changed files with 356 additions and 57 deletions

View file

@ -2097,9 +2097,9 @@ Value Effect
`HEIGHTPERROW_MODE` Interpret the `height` variable as per-row rather than as
overall height.
`FAST_MODE` Use faster if less optimal encodation for symbologies that
support it (currently `DATAMATRIX`, `MICROPDF417` and
`PDF417` only).
`FAST_MODE` Use faster if less optimal encodation or other shortcuts if
available (affects `DATAMATRIX`, `MICROPDF417`, `PDF417`,
`QRCODE` and `UPNQR` only).
--------------------------------------------------------------------------------
Table: API `input_mode` Values {#tbl:api_input_mode tag="$ $"}
@ -3608,6 +3608,10 @@ by using the `--mask` switch with values 0-7, or in the API by setting
option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
```
The `--fast` option (API `input_mode |= FAST_MODE`) may be used when leaving
Zint to automatically select a mask to reduce the number of masks to try to four
(0, 2, 4, 7).
QR Code supports Structured Append of up to 16 symbols and a numeric ID
(parity), which can be set by using the `--structapp` option (see [4.16
Structured Append]) (API `structapp`). The parity ID ranges from 0 (default) to
@ -3738,6 +3742,8 @@ The following example creates a symbol from data saved as a Latin-2 file:
zint -o upnqr.png -b 143 --scale=3 --binary -i upn.txt
```
A mask may be manually specified or the `--fast` option used as with QRCODE.
### 6.6.6 MaxiCode (ISO 16023)
![`zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN

View file

@ -2101,9 +2101,9 @@ property. Valid values are shown in the table below.
HEIGHTPERROW_MODE Interpret the height variable as per-row rather than as
overall height.
FAST_MODE Use faster if less optimal encodation for symbologies that
support it (currently DATAMATRIX, MICROPDF417 and PDF417
only).
FAST_MODE Use faster if less optimal encodation or other shortcuts if
available (affects DATAMATRIX, MICROPDF417, PDF417, QRCODE
and UPNQR only).
-------------------------------------------------------------------------------
: Table  : API input_mode Values
@ -3501,6 +3501,10 @@ option_3 = (N + 1) << 8 where N is 0-7. To use with ZINT_FULL_MULTIBYTE set
option_3 = ZINT_FULL_MULTIBYTE | (N + 1) << 8
The --fast option (API input_mode |= FAST_MODE) may be used when leaving Zint to
automatically select a mask to reduce the number of masks to try to four (0, 2,
4, 7).
QR Code supports Structured Append of up to 16 symbols and a numeric ID
(parity), which can be set by using the --structapp option (see 4.16 Structured
Append) (API structapp). The parity ID ranges from 0 (default) to 255, and for
@ -3627,6 +3631,8 @@ The following example creates a symbol from data saved as a Latin-2 file:
zint -o upnqr.png -b 143 --scale=3 --binary -i upn.txt
A mask may be manually specified or the --fast option used as with QRCODE.
6.6.6 MaxiCode (ISO 16023)
[zint -b MAXICODE -d "1Z00004951\GUPSN\G06X610\G159\G1234567\G1/1\G\GY\G1 MAIN ST\GNY\GNY\R\E" --esc --primary="152382802000000" --scmvv=96]
@ -4421,8 +4427,8 @@ OPTIONS
--fast
Use faster if less optimal encodation (currently affects Data Matrix,
MicroPDF417 & PDF417 only).
Use faster if less optimal encodation or other shortcuts (affects Data
Matrix, MicroPDF417, PDF417, QRCODE & UPNQR only).
--fg=COLOUR

View file

@ -198,8 +198,8 @@ The escape sequences are:
.RE
.TP
\f[V]--fast\f[R]
Use faster if less optimal encodation (currently affects Data Matrix,
MicroPDF417 & PDF417 only).
Use faster if less optimal encodation or other shortcuts (affects Data
Matrix, MicroPDF417, PDF417, QRCODE & UPNQR only).
.TP
\f[V]--fg=COLOUR\f[R]
Specify a foreground (ink) colour where \f[I]COLOUR\f[R] is in hex

View file

@ -148,7 +148,8 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
`--fast`
: Use faster if less optimal encodation (currently affects Data Matrix, MicroPDF417 & PDF417 only).
: Use faster if less optimal encodation or other shortcuts (affects Data Matrix, MicroPDF417, PDF417, QRCODE & UPNQR
only).
`--fg=COLOUR`