c#, read QR code

/// <summary>
/// Read QR code
/// Failed to read, return empty string
/// </summary>
/// <param name="filename">Specify the location of the QR code image< /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;
}

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325184518&siteId=291194637