/// <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;
}

posted on 2018-05-03 11:25  qqhfeng16  阅读(881)  评论(0编辑  收藏  举报