/// <summary>
/// 读取二维码
/// 读取失败,返回空字符串
/// </summary>
/// <param name="filename">指定二维码图片位置</param>
static string Read1(string filename)
{
BarcodeReader reader = new BarcodeReader();
reader.Options.CharacterSet = "UTF-8";
Bitmap map = new Bitmap(filename);
Result result = reader.Decode(map);
return result == null ? "" : result.Text;
}
原文地址:https://www.cnblogs.com/qqhfeng/p/8984498.html
时间: 2024-10-22 11:34:00