IRONSOFTWAREHOME

How to Read QR Codes with Different Scanning Modes

Ahmad Sohail
Ahmad Sohail
Updated: August 2, 2026

Reading QR codes has become a routine task 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.

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.

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);

Scan input

Damaged QR code

Saved text file

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).

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++;
}

Scan input

Cup with a link to the Cafe website

Console display

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

Console display of Website URL

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 rely 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.

Please note: The coordinates that are returned by this function are stored in a strict "zig-zag" sequence: top-left, top-right, bottom-left, and finally, bottom-right
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}");
        }
    }
}

Labelled cup image

Labelled Cup

Labelled console

Labelled Console

Comparison of Scanning Methods

Feature (QrScanMode)Basic Scan (OnlyBasicScan)Auto Scan (Auto)Detection Model (OnlyDetectionModel)
OutputDecoded Text (Value)Decoded Text (Value)Coordinates (Points)
AlgorithmTraditional OnlyHybrid (ML + Traditional)Machine Learning Only
FocusSpeedReadability / RetrievalLocalization / 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.

Frequently Asked Questions

What are the different scanning modes available in IronQR for reading QR codes?

IronQR offers three scanning modes: Auto Scan, Only Basic Scan, and Detection Model. Auto Scan combines machine learning and traditional algorithms for precision, Only Basic Scan uses image processing for clarity and speed, and Detection Model employs machine learning to detect positions.

How does the Auto Scan mode work in IronQR?

Auto Scan mode in IronQR combines machine learning detection with basic scanning algorithms. It's the most versatile option, delivering optimal QR code reading results across various image conditions.

What is the purpose of the Only Basic Scan mode in IronQR?

The Only Basic Scan mode uses traditional image processing techniques to quickly and effectively scan QR codes, especially when they are clearly visible and well-positioned.

When should I use the Detection Model mode in IronQR?

Detection Model mode is ideal for spatial analysis and computer vision applications, as it uses machine learning to detect QR code positions and provides coordinate data for precise localization.

Can IronQR's Only Basic Scan mode read damaged QR codes?

Yes, IronQR's Only Basic Scan mode can read damaged QR codes, provided the three corner squares are clearly visible.

Why is the Auto Scan mode considered the default in IronQR?

The Auto Scan mode is considered the default in IronQR because it provides the highest reliability by combining machine learning and basic algorithms to handle a wide range of QR code scanning scenarios effectively.

What kind of output does each QrScanMode provide in IronQR?

The Auto and Only Basic Scan modes output the decoded text (Value), while the Detection Model provides coordinate data (Points) of detected QR code positions.

How can I read multiple QR codes from a single image using IronQR?

Using the Auto Scan mode, you can read multiple QR codes from a single image by scanning the image and iterating through the resulting list to access the text of each discovered QR code.

What makes Detection Model mode unique in its approach?

Detection Model mode exclusively uses machine learning to locate QR code positions, making it suitable for applications requiring detailed spatial data regarding QR code placement.

Ahmad Sohail
Full Stack Developer

Ahmad is a full-stack developer with a strong foundation in C#, Python, and web technologies. He has a deep interest in building scalable software solutions and enjoys exploring how design and functionality meet in real-world applications.

...
Read More

Ready to Get Started?

Nuget Downloads 74,386Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronQR
nuget.org/packages/IronQR/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronQR"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronQR to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronQR.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required