ASP.NET从图像读取条形码

时间:2020-03-20 13:10:03

标签: asp.net bitmap zxing

我正在尝试从条形码图像中获取isbn代码。
我收到此错误消息:对象引用未设置为对象的实例。
这就是为什么我收到错误消息。这种方法给我空数据。-> reader.Decode(bitmap)
我不知道我会写什么代码。

BarcodeReader reader = new BarcodeReader();
Bitmap bitmap = new Bitmap(Server.MapPath(image.ImageUrl));
var result = reader.Decode(bitmap);
txtISBN.Text = result.ToString();

我正在使用zxing nuget读取条形码。

预先感谢您对我的帮助。

0 个答案:

没有答案