After Update, It doesnt work.
sraban75 opened this issue · comments
Sraban Nadimul Islam Bhuyan commented
This is My old code. and it works fine, but after upgrading from 2.4 to 3.0, It doesn't work
var barcode = new Barcode();
barcode.ImageFormat = ImageFormat.Png;
barcode.IncludeLabel = includeLabel;
using var image = barcode.Encode(TYPE.CODE128, code);
await using var m = new MemoryStream();
image.Save(m, ImageFormat.Png);
var imageBytes = m.ToArray();
Krzysztof Zimny commented
Try #156
Leonardo Dorathoto commented
BarcodeStandard.Barcode barcode = new BarcodeStandard.Barcode();
barcode.IncludeLabel = includeLabel;
barcode.EncodedType = BarcodeStandard.Type.Code128;
barcode.Encode(BarcodeStandard.Type.Code128, code);
You can try to save the image directly through the package instead of doing all this with memorystream
barcode.SaveImage(path, BarcodeStandard.SaveTypes.Png);