mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-16 16:14:36 -04:00
Add alpha channel support and --nobackground option
Alpha channel for PNG and SVG and option to remove background from EMF
This commit is contained in:
parent
18e3b41e0f
commit
47cac63e7f
9 changed files with 195 additions and 72 deletions
|
@ -108,6 +108,7 @@ static void usage(void) {
|
|||
" --init Create reader initialisation/programming symbol\n"
|
||||
" --mirror Use batch data to determine filename\n"
|
||||
" --mode=NUMBER Set encoding mode (Maxicode/Composite)\n"
|
||||
" --nobackground Remove background (PNG/SVG/EPS only)\n"
|
||||
" --notext Remove human readable text\n"
|
||||
" -o, --output=FILE Send output to FILE. Default is out.png\n"
|
||||
" --primary=STRING Set structured primary message (Maxicode/Composite)\n"
|
||||
|
@ -508,6 +509,7 @@ int main(int argc, char **argv) {
|
|||
{"gssep", 0, 0, 0},
|
||||
{"binary", 0, 0, 0},
|
||||
{"fullmultibyte", 0, 0, 0},
|
||||
{"nobackground", 0, 0, 0},
|
||||
{"notext", 0, 0, 0},
|
||||
{"square", 0, 0, 0},
|
||||
{"dmre", 0, 0, 0},
|
||||
|
@ -574,10 +576,10 @@ int main(int argc, char **argv) {
|
|||
}
|
||||
}
|
||||
if (!strcmp(long_options[option_index].name, "fg")) {
|
||||
strncpy(my_symbol->fgcolour, optarg, 7);
|
||||
strncpy(my_symbol->fgcolour, optarg, 9);
|
||||
}
|
||||
if (!strcmp(long_options[option_index].name, "bg")) {
|
||||
strncpy(my_symbol->bgcolour, optarg, 7);
|
||||
strncpy(my_symbol->bgcolour, optarg, 9);
|
||||
}
|
||||
if (!strcmp(long_options[option_index].name, "fullmultibyte")) {
|
||||
fullmultibyte = 1;
|
||||
|
@ -806,6 +808,9 @@ int main(int argc, char **argv) {
|
|||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
if (!strcmp(long_options[option_index].name, "nobackground")) {
|
||||
strcpy(my_symbol->bgcolour, "ffffff00");
|
||||
}
|
||||
break;
|
||||
|
||||
case 'h':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue