此条形码:
不会解码。图像有什么问题,它无法解码。
string barcodePng = "tmp.png";
reader = new BarcodeReader();
reader.Options.PossibleFormats = new List<BarcodeFormat>();
reader.Options.PossibleFormats.Add(BarcodeFormat.CODE_39);
reader.Options.TryHarder = true;
using (var barcodeBitmap = new Bitmap(barcodePng))
{
var result = reader.Decode(barcodeBitmap);
if (result != null)
{
Console.WriteLine("barcode did not decode");
}
}