QRCodeAI.QRCodeBarcodeScanner 0.12.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package QRCodeAI.QRCodeBarcodeScanner --version 0.12.0
                    
NuGet\Install-Package QRCodeAI.QRCodeBarcodeScanner -Version 0.12.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="QRCodeAI.QRCodeBarcodeScanner" Version="0.12.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="QRCodeAI.QRCodeBarcodeScanner" Version="0.12.0" />
                    
Directory.Packages.props
<PackageReference Include="QRCodeAI.QRCodeBarcodeScanner" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add QRCodeAI.QRCodeBarcodeScanner --version 0.12.0
                    
#r "nuget: QRCodeAI.QRCodeBarcodeScanner, 0.12.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package QRCodeAI.QRCodeBarcodeScanner@0.12.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=QRCodeAI.QRCodeBarcodeScanner&version=0.12.0
                    
Install as a Cake Addin
#tool nuget:?package=QRCodeAI.QRCodeBarcodeScanner&version=0.12.0
                    
Install as a Cake Tool

QR Code & Barcode Scanner for .NET: the .NET logo, the quick start in C#, and a QR code and a barcode being read

QR Code & Barcode Scanner for .NET

Ask AI

ChatGPT Claude Gemini Grok Perplexity Copilot DeepSeek Meta AI Qwen

Choose an AI assistant to explain this destination using its public sources. Gemini opens gemini.google.com. Gemini, Copilot, DeepSeek, Meta AI and Qwen require pasting the prompt below; the other links include it in their URL. Sign-in or a manual paste may still be required. Check the answer against the documentation.

Copy the plain-text prompt

Use the code block's copy control, or select its complete text, then paste it into your assistant.

Help me understand QR Code & Barcode Scanner for .NET (bindings/dotnet/README.md) for QR Code & Barcode Scanner, the open-source scanner. Source documentation; publication is not implied. Provided README context (verify against the sources): Use this binding when a C# service or desktop application already holds image bytes and needs the scanner report without starting a subprocess. The managed package loads its bundled native library on the supported operating systems. Its target framework, native runtime floors and unpublished NuGet status below are part of the installation contract. Read the public documentation below. Explain what this destination does, its documented installation or access steps, a minimal example if supported, prerequisites, limitations and license. Distinguish published packages from working source and preparation. Cite your sources; if a page is unavailable or a fact cannot be checked, say so. Do not invent installation commands, benchmark results or comparisons. Answer in my language. Public sources: https://github.com/qrcode-ai-com/qrcode-barcode-scanner-rust/blob/main/bindings/dotnet/README.md https://qrcode-ai.com/en-US/qr-code-scanner https://qrcode-ai.com/en-US/barcode-scanner https://qrcode-ai.com/en-US/qr-code-scanner/sdk/dotnet https://qrcode-ai.com/en-US/barcode-scanner/sdk/dotnet https://qrcode-ai.com/en-US/qr-code-generator https://qrcode-ai.com/en-US/barcode-generator

Use this binding when a C# service or desktop application already holds image bytes and needs the scanner report without starting a subprocess. The managed package loads its bundled native library on the supported operating systems. Its target framework, native runtime floors and unpublished NuGet status below are part of the installation contract.

The QR code scanner and barcode scanner are QR Code AI’s browser scanning entry points. For the corresponding development route, the QR code scanner .NET guide and barcode scanner .NET guide connect this documentation to the two product journeys. If a product page is unavailable, the instructions and references in this README remain the starting point for this source directory.

To prepare a sample image for a C# import workflow, use the QR code generator or the barcode generator. Keep the original payload with the exported image so that you can compare the scan result with the value you intended to encode.

Read QR codes and barcodes from an image in C# and .NET, in process. This package holds the QR Code & Barcode Scanner engine itself, as a native library, and returns its JSON report unchanged. There is no command to install and no network call.

Not published yet. The package id is QRCodeAI.QRCodeBarcodeScanner. No version is on nuget.org. The archive is built, inspected and installed by clean projects on each change; its first publication comes with a later engine release. Maintainers: see the publication setup and release checks.

What you need

  • .NET 8 or later. The package targets .NET 8, and its tests run on .NET 8 and on .NET 10. Microsoft ended its support of .NET 8 on 10 November 2026: .NET 10 is the long-term release it supports.
  • One of five systems, whose native library the package carries: Linux x64 or arm64 with glibc 2.28 or later, macOS 10.15 or later on Intel and 11 or later on Apple silicon, or Windows x64. Alpine and other musl systems are not covered.

Scan an image

using QRCodeAI.QRCodeBarcodeScanner;

var report = Scanner.Scan(File.ReadAllBytes("label.png"));
foreach (var detection in report.Detections)
{
    Console.WriteLine($"{detection.Symbology} {detection.Text}");
}

Scanner.Scan takes the bytes of a PNG, JPEG, WebP or GIF file. Scanner.ScanFrame takes raw pixels, four bytes per pixel in red, green, blue, alpha order, with the width and the height. Both run on the calling thread and return when the scan is done, and both are safe to call from several threads.

Options are one record. Every value left out keeps the engine's own default:

var report = Scanner.Scan(image, new ScanOptions { Profile = ScanProfile.Fast, BudgetMs = 0 });
Profile What the engine does
ScanProfile.Frame Decodes only. The report carries no score. The default of ScanFrame.
ScanProfile.Fast Decodes first, with a reduced judgment.
ScanProfile.Full Decodes and judges how well a QR code scans. The default of Scan.
Option Meaning
BudgetMs The time budget in milliseconds. Left out, the profile keeps its own budget and a busy machine can cut the scan short. 0 sets none: the result then does not depend on how busy the machine is.
MaxDimension, MaxPixels The largest image accepted. A larger one is refused before it is decoded.
ScoreSkipAxes, ScoreSkipChecks, ScorePreset Which parts of the score are left out. A preset and skipped axes cannot be given together.
AlphaBackground, AlphaPalette What a transparent image is laid over, and the backgrounds a transparent code must scan over.

The values each option takes are those of the engine: see the option domains.

Read the report

A QR code and Code 128 decoded from the same image, each outlined where the engine measured it

The picture is a recorded scan of one image that holds a QR code and a Code 128 barcode. Both come back in the same report, each with its format and the place where the engine measured it.

report.Json is the exact text the engine returned. Nothing is renamed, rounded or recalculated, so decode it yourself for the payload, the measured places and the trace. It follows the engine's report contract. The other members read the most used parts:

Member Meaning
Found At least one code was decoded.
Detections One entry per distinct content: Symbology, Text and Raw, the exact bytes.
Score The scannability judgment from 0 to 100, or null.
Complete false when the time budget cut the scan.
EngineVersion The engine that wrote the report.

Three things are easy to get wrong:

  • No code is a result, not an error. Found is false and nothing is thrown.
  • A missing score is not zero. Score is null with ScanProfile.Frame, or when the budget ran out before the judgment.
  • An incomplete scan proves nothing. When Complete is false, an empty report does not mean the image holds no code. Scan again with a larger budget or with BudgetMs = 0.

Decoded text is untrusted data: a QR code can hold any text. Do not follow its links or run it.

When something fails

Every refusal is one exception type, ScanException. Its message is the engine's own sentence.

Case When Code
ScanFailed The engine refused the image or a limit: bytes that are not an image, an image above a limit, a frame whose size does not match its pixels, a limit of zero. The engine's code, such as QRS-001 for bytes that are not an image.
UnknownAlphaBackground, UnknownPaletteColor, UnknownScorePreset, UnknownStressAxis, UnknownScoreCheck, PaletteTooLarge, ScorePresetConflict An option holds a value the engine does not know, or two options that cannot go together. null
EngineFault A fault inside the engine itself, not a refusal of your input. null

The codes are listed in the engine's error catalog.

What it reads

The package holds the engine, so it reads what the engine reads. Codes of different formats in the same image come back in one report.

The code families the engine reads: QR codes, matrix and stacked codes such as Data Matrix, retail barcodes such as EAN-13, and other linear barcodes such as Code 128

Family Formats
QR QR Code, Micro QR, rectangular Micro QR (rMQR)
Matrix and stacked Data Matrix, Aztec, PDF417, MaxiCode
Retail EAN-13, EAN-8, UPC-A, UPC-E
Other linear Code 128, Code 39, Code 93, Codabar, ITF, GS1 DataBar, GS1 DataBar Expanded, Telepen

The engine's supported formats section states the known limits.

The same engine in other runtimes

One engine in the language you write: Rust on crates.io, Node.js and the browser on npm, Python on PyPI, Go, PHP, and the qrscan command line

Runtime Package How it scans
Rust qrcode-barcode-scanner on crates.io In process
Node.js @qrcode-ai-com/qrcode-barcode-scanner on npm In process, native
Browser @qrcode-ai-com/qrcode-barcode-scanner-wasm on npm In the page, WebAssembly
Python qrcode-barcode-scanner on PyPI In process
Go qrcode-barcode-scanner-go Through the installed qrscan
PHP qrcode-barcode-scanner-php Through the installed qrscan
Command line qrscan One command, one JSON report

The Rust, Node.js, browser and Python packages hold the engine. The Go and PHP packages hold no decoder: each one starts qrscan and hands you its report.

Language and platform names and logos belong to their owners. They identify a runtime or a destination and imply no endorsement.

How it is built

The package is a thin layer over the engine's UniFFI library, the same one the Kotlin and Swift bindings use. Two inputs are produced by the workflow from one commit and are never checked in:

  • the native library, built from crates/qrcode-ai-scanner-uniffi with its locked UniFFI;
  • the C# that uniffi-bindgen-cs generates from that very library, at the release of the same UniFFI line. It stays internal: the public API is the six types of this folder.

Generating both from one commit is what keeps their contract checksums equal. The workflow .NET binding of the engine repository (.github/workflows/dotnet.yml) does it on each change:

  • on three systems it runs the tests of this folder on .NET 8 and on .NET 10;
  • it builds the native library for the five systems at the floors above, and a program reads each file to check what it needs from the system that loads it;
  • it packs the archive, inspects it file by file, then on the five systems a clean project installs it from a folder, scans the engine's mixed fixture with the three profiles and removes it. The engine's acceptance driver judges those scans.

License

MIT for project-authored source: see LICENSE and the licensing guide.

Maintained by Thibaut Mélen & Nicolas Cella for QR Code AI, a product of SuperNovae Studio. The license of each component is stated in its own license files.

Source license

Project-authored scanner code and documentation in this checkout are available under the MIT License. You may use, modify and redistribute this source in open-source or proprietary applications, including commercial products, while preserving the copyright and permission notice. Thibaut Mélen & Nicolas Cella develop QR Code AI at SuperNovae Studio.

Retained third-party code, dependencies, artwork and test data keep their own licenses and notices. The licensing guide explains these component boundaries; the project license does not assign a license to an unrelated platform or service.

Published archives retain the license shipped with their version. A pinned engine, adapter or bundle may therefore have different terms from this working source. Read its packaged license and the license history before reuse. The source change does not replace an archive or publish a new version.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.12.3 61 12/2/2026
0.12.2 112 11/27/2026
0.12.1 119 11/26/2026
0.12.0 110 11/22/2026