C#识别图中二维码

1.在NuGet中添加 ZXing.Net

2.实例代码

///


/// 识别图中二维码
///

///
///
private string DecodeQrCode(Bitmap barcodeBitmap)
{
BarcodeReader reader = new BarcodeReader();
reader.Options.CharacterSet = "UTF-8";
var result = reader.Decode(barcodeBitmap);
return (result == null) ? null : result.Text;
}

转载于:https://www.cnblogs.com/xiewei123/p/10902556.html

你可能感兴趣的:(C#识别图中二维码)