Add Data Matrix Rectangular Extension (DMRE) in regular distribution

- add define "DM_DMRE	101" to zint.h as option_3 value
- add option "-dmre" to command line
- add ckeckbutton "Activate DMRE in automatic mode" to qzint
- make dmatrix.c/dmatrix.h aware of option_3 value DM_DMRE and include DMRE in automatic mode
- Use version 2.5 everywere (as already started by Robin)
- common test case for DMRE in automatic mode is numeric input data with 48 digits, which should lead to a symbol of size 8x64
This commit is contained in:
Harald Oehlmann 2016-02-27 21:26:52 +01:00
parent 0d7ee10ef5
commit 372994d794
13 changed files with 93 additions and 92 deletions

View file

@ -101,6 +101,7 @@ void usage(void) {
" --binary Treat input as Binary data\n"
" --notext Remove human readable text\n"
" --square Force Data Matrix symbols to be square\n"
" --dmre Allow Data Matrix Rectangular Extended\n"
" --init Create reader initialisation symbol (Code 128)\n"
" --smalltext Use half-size text in PNG images\n"
" --batch Treat each line of input as a separate data set\n"
@ -409,6 +410,7 @@ int main(int argc, char **argv) {
{"binary", 0, 0, 0},
{"notext", 0, 0, 0},
{"square", 0, 0, 0},
{"dmre", 0, 0, 0},
{"init", 0, 0, 0},
{"smalltext", 0, 0, 0},
{"batch", 0, 0, 0},
@ -471,6 +473,11 @@ int main(int argc, char **argv) {
if (!strcmp(long_options[option_index].name, "square")) {
my_symbol->option_3 = DM_SQUARE;
}
/* Square overwrites DMRE */
if (!strcmp(long_options[option_index].name, "dmre")
&& my_symbol->option_3 != DM_SQUARE) {
my_symbol->option_3 = DM_DMRE;
}
if (!strcmp(long_options[option_index].name, "scale")) {
my_symbol->scale = (float) (atof(optarg));
if (my_symbol->scale < 0.01) {