using IronQr;
using System.Drawing;
using System.Linq;
// Import an image containing a QR code
var inputImage = Image.FromFile("sample.jpg");
// Load the asset into a QrImageInput object
var imageInput = new QrImageInput(inputImage);
// Create a QR Reader object
var reader = new QrReader();
// Read the input and get all embedded QR codes
IEnumerable<QrResult> results = reader.Read(imageInput);
// Display the type of the first QR code found
Console.WriteLine($"The QR type is {results.First().QrType}");
Imports IronQr
Imports System.Drawing
Imports System.Linq
' Import an image containing a QR code
Dim inputImage As Image = Image.FromFile("sample.jpg")
' Load the asset into a QrImageInput object
Dim imageInput As New QrImageInput(inputImage)
' Create a QR Reader object
Dim reader As New QrReader()
' Read the input and get all embedded QR codes
Dim results As IEnumerable(Of QrResult) = reader.Read(imageInput)
' Display the type of the first QR code found
Console.WriteLine($"The QR type is {results.First().QrType}")