首页 新闻 会员 周边

C# 中 ZXing.Net 怎样突破 条形码 多识别 数量限制

0
悬赏园豆:50 [待解决问题]

DecodeMultiple 方法最多只能识别 6个 条形码?

代码:如下

//1设置读取条形码的规格
DecodingOptions decoding = new DecodingOptions();
decoding.PossibleFormats = new List<BarcodeFormat>()
{
//BarcodeFormat.EAN_13
BarcodeFormat.All_1D
};//指定读取的格式

        //2.进行读取操作
        BarcodeReader br = new BarcodeReader();
        br.Options = decoding;//指定规格
        //Result result = br.Decode(pictureBox1.Image as Bitmap);//进行读取条形码数字
        
        //Image image1 =Image.FromFile("C:\\Users\\ICC\\Desktop\\333.jpg");
        Image image1 = Image.FromFile("C:\\Users\\ICC\\Desktop\\IMG5.png");
        

        Result [] result=br.DecodeMultiple(image1 as Bitmap);

        if (result == null)
        {
            label1.Text = "读取失败";
            MessageBox.Show("读取失败");
        }
        else
        {
            label1.Text = "";
            for(int i = 0; i < result.Length; i++)
            {
                label1.Text +="   :" +result[i].Text;
            }
            //MessageBox.Show("读取成功,内容:" + result[0].Text);
        }
过河小斌的主页 过河小斌 | 初学一级 | 园豆:38
提问于:2020-05-26 16:01
< >
分享
所有回答(1)
0

可以试试Spire.Barcode
C# 使用 Spire.Barcode 识别条形码:https://www.e-iceblue.cn/spirebarcode/scan-barcode-in-c.html

ms_doudou | 园豆:1166 (小虾三级) | 2020-05-27 09:12
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册