C#识别图中二维码
1.在NuGet中添加 ZXing.Net
2.实例代码
/// <summary>
/// 识别图中二维码
/// </summary>
/// <param name="barcodeBitmap"></param>
/// <returns></returns>
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;
}