(zxing.net)解码

    //图片路径
    string imgPath = @"D:\barcode.png";

    //解码通用类
    IBarcodeReader reader = new BarcodeReader();
    Bitmap bmp = new Bitmap(imgPath);
    Result result = reader.Decode(bmp);
    bmp.Dispose();
    if (result != null)
    {
        string text = result.Text; //条码内容
        string foramt = result.BarcodeFormat.ToString(); //条码类型
    }

 

转载于:https://www.cnblogs.com/weiweixiang/p/10102593.html

你可能感兴趣的:((zxing.net)解码)