(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(); //条码类型
    }

 

posted @ 2018-12-11 15:41  a boy  阅读(4382)  评论(0编辑  收藏  举报