标签:style false option format log public har 二维码 string
public string Recognize(Bitmap image)
{
string text = string.Empty;
var barcodeReader = new BarcodeReader();
var options = new DecodingOptions();
options.PureBarcode = false;
options.TryHarder = true;
options.PossibleFormats = new List<BarcodeFormat>() { BarcodeFormat.QR_CODE };
barcodeReader.AutoRotate = true;
barcodeReader.Options = options;
//barcodeReader.TryInverted = true;
var res = barcodeReader.Decode(image);
if (res == null) return text;
text = res.Text;
return text;
}
标签:style false option format log public har 二维码 string
原文地址:http://www.cnblogs.com/dyxd/p/6704569.html