Read saved QR images
Pass PNG, JPEG, WebP or GIF bytes to Scanner.Scan() and receive decoded text, raw bytes, QR quality score and report.Json.
NuGet
5 OS/arch
In-process
MIT
Load the bundled native Rust library inside C# services and desktop apps with zero subprocesses or network calls.
Pass PNG, JPEG, WebP or GIF bytes to Scanner.Scan() and receive 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 to invoke across concurrent .NET tasks.
Configure Profile, BudgetMs, Formats and MaxDimension via ScanOptions, and handle refusals cleanly through ScanException.
Install the NuGet package, pass image bytes to Scanner.Scan and inspect detections and score.
Install QRCodeAI.QRCodeBarcodeScanner on NuGet. The package targets .NET 8 and is tested on .NET 8 and .NET 10 (.NET 10 is the current Microsoft LTS release).
Native libraries are bundled for five systems: Linux x64 and arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine and other musl Linux distributions are not covered.
dotnet add package QRCodeAI.QRCodeBarcodeScanner
No external CLI binary or Rust toolchain is needed: the managed assembly loads its bundled native UniFFI library automatically.
Every fresh-install check runs across all five supported OS/architecture combinations 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 (offload with Task.Run in UI or web request paths if 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 (reduced scoring) and ScanProfile.Full (default of Scan).
Leave BudgetMs omitted 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/". Read report.Score (0 to 100, or null when unmeasured) and report.Json when you need full geometry, payloads or trace fields.
No QR code found sets report.Found to 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. Configure MaxDimension, MaxPixels, Formats, AlphaBackground, AlphaPalette and scoring presets via ScanOptions (see option domains). Treat decoded strings as untrusted input.
Runtime floors and MIT license. Runs on .NET 8 and .NET 10 across five glibc/macOS/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 NuGet package (QRCodeAI.QRCodeBarcodeScanner) that bundles the native Rust engine directly 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 run synchronously on the calling thread and are safe to invoke concurrently from multiple .NET threads or Task.Run workers without 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 (no scoring).
When no code is detected, report.Found is false and nothing is thrown (verify report.Complete is true). A null Score means 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, so you can parse structured payloads, geometry and trace fields with System.Text.Json.
No. The native library is bundled inside the NuGet package and runs 100% locally in process with no subprocess, no network requests, no QR Code AI account and no creation credits.
Yes. Current releases are MIT-licensed for commercial and proprietary software while retaining copyright and license notices (see LICENSING.md). SDK use is separate from QR Code AI’s paid creation plans and seven-day Premium trial.