Performance improvement

Simplifies the QR code and improves performance
Adds a new --dump option to output binary to stdout
With thanks to Ismael Luceno
This commit is contained in:
hooper 2010-09-12 14:52:44 +01:00
parent 2300a76a07
commit 93c678e1cf
4 changed files with 103 additions and 293 deletions

View file

@ -91,6 +91,7 @@ void usage(void)
" --directpng Send PNG output to stdout\n"
" --directeps Send EPS output to stdout\n"
" --directsvg Send SVG output to stdout\n"
" --dump Dump binary data to stdout\n"
" --rotate=NUMBER Rotate symbol (PNG output only).\n"
" --cols=NUMBER (PDF417) Number of columns.\n"
" --vers=NUMBER (QR Code) Version\n"
@ -193,6 +194,7 @@ int main(int argc, char **argv)
{"directeps", 0, 0, 0},
{"directpng", 0, 0, 0},
{"directsvg", 0, 0, 0},
{"dump", 0, 0, 0},
{"barcode", 1, 0, 'b'},
{"height", 1, 0, 0},
{"whitesp", 1, 0, 'w'},
@ -241,6 +243,10 @@ int main(int argc, char **argv)
my_symbol->output_options += BARCODE_STDOUT;
strncpy(my_symbol->outfile, "dummy.svg", 10);
}
if(!strcmp(long_options[option_index].name, "dump")) {
my_symbol->output_options += BARCODE_STDOUT;
strncpy(my_symbol->outfile, "dummy.txt", 10);
}
if(!strcmp(long_options[option_index].name, "gs1")) {
my_symbol->input_mode = GS1_MODE;
}