using IronQr;using IronQr.Enum;using IronSoftware.Drawing;using System.IO;using System.Linq;// Load the imagevar bmp = AnyBitmap.FromFile("damaged-qr.png");// Create scan input using Only Basic Scan modevar input = new QrImageInput(bmp, QrScanMode.OnlyBasicScan);// Get the resultvar result = new QrReader().Read(input).FirstOrDefault();// Save the output to a text fileFile.WriteAllText("basic-scan-output.txt", result.Value);
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
using System.IO;
using System.Linq;
// Load the image
var bmp = AnyBitmap.FromFile("damaged-qr.png");
// Create scan input using Only Basic Scan mode
var input = new QrImageInput(bmp, QrScanMode.OnlyBasicScan);
// Get the result
var result = new QrReader().Read(input).FirstOrDefault();
// Save the output to a text file
File.WriteAllText("basic-scan-output.txt", result.Value);
ImportsIronQrImportsIronQr.EnumImportsIronSoftware.DrawingImportsSystem.IOImportsSystem.Linq' Load the imageDim bmp = AnyBitmap.FromFile("damaged-qr.png")' Create scan input using Only Basic Scan modeDim input = New QrImageInput(bmp, QrScanMode.OnlyBasicScan)' Get the resultDim result = (New QrReader()).Read(input).FirstOrDefault()' Save the output to a text fileFile.WriteAllText("basic-scan-output.txt", result.Value)
Imports IronQr
Imports IronQr.Enum
Imports IronSoftware.Drawing
Imports System.IO
Imports System.Linq
' Load the image
Dim bmp = AnyBitmap.FromFile("damaged-qr.png")
' Create scan input using Only Basic Scan mode
Dim input = New QrImageInput(bmp, QrScanMode.OnlyBasicScan)
' Get the result
Dim result = (New QrReader()).Read(input).FirstOrDefault()
' Save the output to a text file
File.WriteAllText("basic-scan-output.txt", result.Value)
using System;using IronQr;using IronQr.Enum;using IronSoftware.Drawing;// Load the image filevar bmp = AnyBitmap.FromFile("cup.png");// Create scan input using Auto Scan modevar input = new QrImageInput(bmp, QrScanMode.Auto);// Scan and read all QR codesvar results = new QrReader().Read(input);// Initialize a counter to track the number of QR codesint count = 1;// Loop through each discovered QR codeforeach (var result in results){Console.WriteLine($"QR {count}: {result.Value}"); count++;}
using System;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
// Load the image file
var bmp = AnyBitmap.FromFile("cup.png");
// Create scan input using Auto Scan mode
var input = new QrImageInput(bmp, QrScanMode.Auto);
// Scan and read all QR codes
var results = new QrReader().Read(input);
// Initialize a counter to track the number of QR codes
int count = 1;
// Loop through each discovered QR code
foreach (var result in results)
{
Console.WriteLine($"QR {count}: {result.Value}");
count++;
}
ImportsSystemImportsIronQrImportsIronQr.EnumImportsIronSoftware.Drawing' Load the image fileDim bmp = AnyBitmap.FromFile("cup.png")' Create scan input using Auto Scan modeDim input = New QrImageInput(bmp, QrScanMode.Auto)' Scan and read all QR codesDim results = New QrReader().Read(input)' Initialize a counter to track the number of QR codesDim count AsInteger = 1' Loop through each discovered QR codeFor Each result In resultsConsole.WriteLine($"QR {count}: {result.Value}") count += 1Next
Imports System
Imports IronQr
Imports IronQr.Enum
Imports IronSoftware.Drawing
' Load the image file
Dim bmp = AnyBitmap.FromFile("cup.png")
' Create scan input using Auto Scan mode
Dim input = New QrImageInput(bmp, QrScanMode.Auto)
' Scan and read all QR codes
Dim results = New QrReader().Read(input)
' Initialize a counter to track the number of QR codes
Dim count As Integer = 1
' Loop through each discovered QR code
For Each result In results
Console.WriteLine($"QR {count}: {result.Value}")
count += 1
Next
using System;using IronQr;using IronQr.Enum;using IronSoftware.Drawing;using System.Linq;// Load the imagevar bmp = AnyBitmap.FromFile("cup.png");// Create scan input using Detection Model modevar input = new QrImageInput(bmp, QrScanMode.OnlyDetectionModel);// Read QR codevar result = new QrReader().Read(input).FirstOrDefault();// Print position dataif (result != null){ if (result.Points != null) { foreach (var point in result.Points) {Console.WriteLine($"Point: X={point.X}, Y={point.Y}"); } }}
using System;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
using System.Linq;
// Load the image
var bmp = AnyBitmap.FromFile("cup.png");
// Create scan input using Detection Model mode
var input = new QrImageInput(bmp, QrScanMode.OnlyDetectionModel);
// Read QR code
var result = new QrReader().Read(input).FirstOrDefault();
// Print position data
if (result != null)
{
if (result.Points != null)
{
foreach (var point in result.Points)
{
Console.WriteLine($"Point: X={point.X}, Y={point.Y}");
}
}
}
ImportsSystemImportsIronQrImportsIronQr.EnumImportsIronSoftware.DrawingImportsSystem.Linq' Load the imageDim bmp = AnyBitmap.FromFile("cup.png")' Create scan input using Detection Model modeDim input = New QrImageInput(bmp, QrScanMode.OnlyDetectionModel)' Read QR codeDim result = (New QrReader()).Read(input).FirstOrDefault()' Print position dataIf result IsNot Nothing Then If result.PointsIsNot Nothing Then For Each point In result.PointsConsole.WriteLine($"Point: X={point.X}, Y={point.Y}") Next End IfEnd If
Imports System
Imports IronQr
Imports IronQr.Enum
Imports IronSoftware.Drawing
Imports System.Linq
' Load the image
Dim bmp = AnyBitmap.FromFile("cup.png")
' Create scan input using Detection Model mode
Dim input = New QrImageInput(bmp, QrScanMode.OnlyDetectionModel)
' Read QR code
Dim result = (New QrReader()).Read(input).FirstOrDefault()
' Print position data
If result IsNot Nothing Then
If result.Points IsNot Nothing Then
For Each point In result.Points
Console.WriteLine($"Point: X={point.X}, Y={point.Y}")
Next
End If
End If