zint / zint-gpl-only

Zint Barcode Generator
https://zint.org.uk/
GNU General Public License v3.0
525 stars 138 forks source link

bitmap var not filled #73

Closed progsoftpack closed 2 years ago

progsoftpack commented 4 years ago

I' try to generate a barcode to memery, in order to use later with this code:

unsigned char* co=(unsigned char* )"1234"; auto zint = ZBarcode_Create(); strcpy(zint->bgcolour, "C0C0FF"); strcpy(zint->fgcolour, "000000"); //zint->output_options = ; zint->border_width = 3; // in pixels zint->height = 20; // in pixels zint->scale = 1.0; zint->symbology = BARCODE_UPCA; ZBarcode_Encode(zint, co, 0); ZBarcode_Buffer(zint,0); ZBarcode_Delete(zint);

But the var "bitmap" (where should be stored the bitmap image) is not filled. But if i use the print function, the image is generated and stored correctly, even with that function the "bitmap" var is empty.

oehhar commented 4 years ago

You may consider to ask on zint on sourceforge, as this branch is IMHO not so much maintained.

I personally use the sequence:

ZBarcode_Encode_and_Buffer(hSymbol, (unsigned char *) pStr, lStr, rotate_angle);

which will leave the pixel image in "hSymbol->bitmap".

Hope this helps, Harald

progsoftpack commented 4 years ago

I also tried with the "ZBarcode_Encode_and_Buffer" but the behavior is the same. I will write this bug also on sourceforge

progsoftpack commented 4 years ago

https://sourceforge.net/p/zint/tickets/182/

gitlost commented 2 years ago

As this issue is marked as resolved on SourceForge am closing this, thanks.