How to Read QR Codes with Different Scanning Modes
Reading QR codes has become a routine task in 2025 as more products move toward digitization and always-online access. Storing necessary data in compact, read-only imprints is now the standard, and developers need effective ways to extract that information in different environments.
IronQR provides 3 read options for QR codes, each designed for specific use cases.
In this how-to guide, all three methods will be explained with clear examples. If you haven’t checked it out yet, take a look at the previous guide on reading QR codes from images or writing your own QR code.
How to Read QR Codes with Different Scan Modes
- Download the C# library to read QR codes with advanced scanning options
- Load the target image file
- Initialize a
QrImageInputpassing the image and the requiredQrScanMode - Instantiate the
QrReaderclass and pass the input object to theReadmethod - Retrieve the results to access the decoded
Valuetext or iterate through thePointsarray for coordinate data.
Understanding QR Code Scanning Modes
IronQR offers three powerful scanning modes through the QrScanMode enumeration:
- Auto Mode (
QrScanMode.Auto): combines both machine learning detection and basic scanning algorithms for maximum accuracy and reliability - Only Basic Scan Mode (
QrScanMode.OnlyBasicScan): uses conventional image processing techniques for fast, reliable scanning when QR codes are clearly visible - Detection Model Mode (
QrScanMode.OnlyDetectionModel): Leverages machine learning to detect QR code positions, ideal for extracting coordinate data
Let's explore each scanning method in detail.
Only Basic Scan Mode
Only Basic Scan mode uses traditional image processing algorithms without the use of machine learning. This method is fast and efficient when QR codes are clearly visible and well-positioned; however, it still works on damaged QRs if the three corner squares are readable.
:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-basic.csusing System.Linq;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
using System.IO;
// 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);Scan input

Saved text file

Auto Scan Mode
Auto Scan mode is the default (for QrScanMode) and the most versatile option available. It automatically combines machine learning detection with traditional scanning algorithms to deliver the best possible results across a range of image conditions.
The example shows an image being loaded and activating the Auto mode. It then scans the image and collects every QR code it finds into a list. Finally, it goes through the results collection and prints the text of each value within to the console (In this case, just the URL).
:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-auto.csusing 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++;
}Scan input

Console display
The URL of the cafe website gets logged after scanning the photo via IronQR.

Detection Model Mode
The Detection Model mode uses machine learning specifically for detecting QR code positions within images. This quality makes it invaluable for spatial analysis and computer vision applications. The coordinate system that it uses has the origin at (0, 0).
Generally, QR scanners make use of standard decoding algorithms which relies on three finder patterns, this model captures all four vertices of the ID. The result object contains a Points collection that you iterate through to retrieve the position data.
The code reuses the cup photo from the previous example to demonstrate the detection of positional values within the image.
:path=/static-assets/qr/content-code-examples/how-to/read-qr-codes-with-scan-modes-detection-model.csusing System;
using System.Linq;
using IronQr;
using IronQr.Enum;
using IronSoftware.Drawing;
// 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}");
}
}
}Labelled cup image

Labelled console

Comparison of Scanning Methods
Feature (QRScanMode) | Basic Scan (OnlyBasicScan) | Auto Scan (Auto) | Detection Model (OnlyDetectionModel) |
|---|---|---|---|
| Output | Decoded Text (Value) | Decoded Text (Value) | Coordinates (Points) |
| Algorithm | Traditional Only | Hybrid (ML + Traditional) | Machine Learning Only |
| Focus | Speed | Readability / Retrieval | Localization / Computer Vision |
Conclusion
IronQR's three scanning modes provide flexibility for any QR code reading scenario:
- Auto Scan: Maximum accuracy and reliability for general use
- Basic Scan: Speed and efficiency for high-quality images
- Detection Model: Position awareness for spatial applications
By understanding the strengths of each method, you can optimize your QR code reading implementation for your specific requirements. Whether you need comprehensive data extraction, lightning-fast processing, or precise position detection, IronQR has you covered.
For more examples and detailed API information, visit the IronQR documentation or explore the code examples on GitHub.






