Read saved QR images
Pass PNG, JPEG, WebP or GIF bytes to Scanner.Scan() and get decoded text, raw bytes, QR quality score and report.Json.
NuGet
5 OS/arch
In-process
MIT
Load the bundled native Rust library directly inside C# services and desktop apps with zero subprocesses or network calls.
Pass PNG, JPEG, WebP or GIF bytes to Scanner.Scan() and get decoded text, raw bytes, QR quality score and report.Json.
Pass width, height and RGBA pixel bytes to Scanner.ScanFrame(). Both methods are thread-safe across concurrent .NET tasks.
Configure Profile, BudgetMs, Formats and MaxDimension with ScanOptions, and handle refusals cleanly using ScanException.
Install the NuGet package, pass image bytes to Scanner.Scan and read detections along with the QR score.
Install QRCodeAI.QRCodeBarcodeScanner on NuGet. The package targets .NET 8 and is verified on .NET 8 and .NET 10 (.NET 10 is the current Microsoft LTS release).
Native libraries ship bundled for five targets: Linux x64 and arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine and other musl-based Linux distributions are not supported.
dotnet add package QRCodeAI.QRCodeBarcodeScanner
No external CLI binary or Rust toolchain is required: the managed assembly loads its bundled native UniFFI library automatically.
Every fresh-install check runs across all five supported OS and architecture targets before release.
Call Scanner.Scan with PNG, JPEG, WebP or GIF bytes and an optional ScanOptions record. Both Scanner.Scan and Scanner.ScanFrame are thread-safe and synchronous (wrap in Task.Run on UI or web request threads when needed).
using QRCodeAI.QRCodeBarcodeScanner;
var bytes = File.ReadAllBytes("label.png");
var options = new ScanOptions
{
Profile = ScanProfile.Full,
Formats = ["qr_code"],
BudgetMs = 0,
};
var report = Scanner.Scan(bytes, options);
foreach (var detection in report.Detections)
{
Console.WriteLine($"{detection.Symbology}: {detection.Text}");
}
Profiles: ScanProfile.Frame (decode only, Score is null), ScanProfile.Fast (lighter scoring) and ScanProfile.Full (default for Scan).
Omit BudgetMs to keep the profile default, or set BudgetMs = 0 for an unbounded scan. Check report.Complete before treating empty results as final.
For a QR image encoding https://qrcode-ai.com/, detection.Text is "https://qrcode-ai.com/". Inspect report.Score (0 to 100, or null when unmeasured) and report.Json whenever you need full geometry, payloads or trace fields.
When no QR code is detected, report.Found is false without throwing. Refusals throw ScanException with Case (ScanFailed carrying Code such as QRS-001, option errors or EngineFault).
Six public types over UniFFI. The NuGet package wraps internal uniffi-bindgen-cs bindings behind a clean C# API (Scanner, ScanOptions, ScanProfile, ScanReport, Detection and ScanException) with zero subprocess overhead.
Options and limits. Tune MaxDimension, MaxPixels, Formats, AlphaBackground, AlphaPalette and scoring presets through ScanOptions (see scan profile and option domains). Treat decoded strings as untrusted input.
Runtime floors and MIT licence. Works on .NET 8 and .NET 10 across five glibc, macOS and Windows targets (no musl). Current releases are MIT-licensed; see the .NET binding README.
Official package documentation, ScanReport specification and licensing references.
NuGet, .NET 8/10, native targets, thread safety, ScanException and licensing.
It is QR Code AI’s open-source MIT-licensed NuGet package (QRCodeAI.QRCodeBarcodeScanner) that bundles the native Rust engine inside a managed .NET library, decoding QR codes, Micro QR, rMQR and 16 barcode formats in-process.
The package targets .NET 8 and is tested on .NET 8 and .NET 10 (.NET 10 is the current Microsoft LTS release). Bundled native libraries cover Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine and other musl Linux images are not supported.
Yes. Both methods execute synchronously on the calling thread and are safe to call concurrently from multiple .NET threads or Task.Run workers with no shared mutable state.
Yes. Call Scanner.ScanFrame(rgba, width, height, options) with four bytes per pixel in RGBA order. Its default profile is ScanProfile.Frame (decoding only, no scoring).
When no code is detected, report.Found is false and nothing is thrown (verify report.Complete is true). A null Score indicates unmeasured, never zero. Invalid inputs or options throw ScanException with a typed Case and optional engine Code such as QRS-001.
Yes. report.Json holds the exact JSON string produced by the engine with nothing renamed or rounded, letting you parse structured payloads, geometry and trace fields using System.Text.Json.
No. The native library ships bundled inside the NuGet package and executes 100% locally in-process with no subprocess, no network calls, no QR Code AI account and no creation credits.
Yes. Current releases are MIT-licensed for commercial and proprietary .NET applications as long as you retain the copyright and licence notices (see LICENSING.md). SDK use is independent of QR Code AI’s paid creation plans and seven-day Premium trial.