After Update, It doesnt work.
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();
Try #156
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);
Going to close this as resolved as saving is provided through the lib as pointed out by @dorathoto