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:
Robin Stuart 2020-08-02 22:26:39 +01:00
parent 18e3b41e0f
commit 47cac63e7f
9 changed files with 195 additions and 72 deletions

View file

@ -55,7 +55,9 @@ struct zint_symbol *ZBarcode_Create() {
symbol->rows = 0;
symbol->width = 0;
strcpy(symbol->fgcolour, "000000");
symbol->fgcolor = &symbol->fgcolour[0];
strcpy(symbol->bgcolour, "ffffff");
symbol->bgcolor = &symbol->bgcolour[0];
strcpy(symbol->outfile, "out.png");
symbol->scale = 1.0;
symbol->option_1 = -1;
@ -67,6 +69,7 @@ struct zint_symbol *ZBarcode_Create() {
symbol->bitmap = NULL;
symbol->bitmap_width = 0;
symbol->bitmap_height = 0;
symbol->alphamap = NULL;
symbol->eci = 0; // Default 0 uses ECI 3
symbol->dot_size = 4.0 / 5.0;
symbol->vector = NULL;