解析二維碼

 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; }
相關文章
相關標籤/搜索