Read label images
Pass PNG, JPEG, WebP or GIF label bytes to Scanner.Scan(). A Code 128 label encoding STOCK-4827 returns that exact string.
NuGet
5 OS/arch
1D + 2D
MIT
Decode 1D retail, warehouse and 2D matrix labels inside C# services and desktop apps with bundled native libraries.
Pass PNG, JPEG, WebP or GIF label bytes to Scanner.Scan(). A Code 128 label encoding STOCK-4827 returns that exact string.
Pass raw RGBA pixels with width and height to Scanner.ScanFrame(). Both methods stay thread-safe across concurrent .NET tasks.
Restrict symbologies via ScanOptions.Formats and keep Detection.Text as a C# string so leading zeros remain intact.
Install the NuGet package, restrict symbologies in ScanOptions and return exact identifier strings.
Install QRCodeAI.QRCodeBarcodeScanner on NuGet. Targets .NET 8 and is verified on .NET 8 and .NET 10 (.NET 10 is Microsoft’s current LTS release).
Ships native libraries for Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine and musl Linux images are not supported.
dotnet add package QRCodeAI.QRCodeBarcodeScanner
No external CLI binary or Rust toolchain is needed; the managed package loads its bundled native UniFFI library in process.
Fresh-install verification runs across all five supported OS and architecture platforms.
Pass encoded label bytes (PNG, JPEG, WebP or GIF) and ScanOptions.Formats to Scanner.Scan so only the selected barcode readers execute.
To test against a known sample, create a Code 128 barcode with Barcode Generator encoding STOCK-4827 and scan the exported PNG.
using QRCodeAI.QRCodeBarcodeScanner;
var bytes = File.ReadAllBytes("label.png");
var options = new ScanOptions
{
Profile = ScanProfile.Frame,
Formats = ["code128", "code39", "ean13", "ean8", "upc_a", "upc_e", "itf", "data_matrix"],
};
var report = Scanner.Scan(bytes, options);
foreach (var detection in report.Detections)
{
Console.WriteLine($"{detection.Symbology}: {detection.Text}");
}
Switch to ScanProfile.Full or set BudgetMs = 0 for low-contrast or damaged labels. Always check report.Complete before treating empty results as final.
Add pdf417, aztec, code93, codabar, data_bar, data_bar_expanded, telepen or maxi_code to Formats as required.
For a Code 128 label encoding STOCK-4827, detection.Symbology is "code128" and detection.Text is "STOCK-4827". A UPC-A value such as 012345678905 stays a C# string with its leading zero intact.
When no barcode matches, report.Found is false without throwing. Invalid files or unknown options throw ScanException with Case and an optional engine Code such as QRS-001.
Sixteen barcode formats. Decodes EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode (ISBN maps to ean13, GS1-128 to code128, ITF-14 to itf).
Concurrency and options. Scanner.Scan and Scanner.ScanFrame are thread-safe in process; configure MaxDimension, MaxPixels and Formats via ScanOptions (see option domains). Parse report.Json for GS1 payloads and keep product catalogue lookups separate.
Runtime floors and MIT licence. Supports .NET 8 and .NET 10 across five glibc/macOS/Windows targets (no musl). Current releases carry the MIT licence; see the .NET binding README.
Official package documentation, ScanReport specification and licensing references.
NuGet, formats, leading zeros, native targets, thread safety and licensing.
It is QR Code AI’s open-source MIT-licensed NuGet package (QRCodeAI.QRCodeBarcodeScanner) that bundles the native Rust engine in process for .NET 8 and .NET 10, decoding 16 1D and 2D barcode formats plus QR codes.
It decodes EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode, plus QR Code, Micro QR and rMQR. Set ScanOptions.Formats to run only the readers you need.
Targets .NET 8 and is verified on .NET 8 and .NET 10 (.NET 10 is the supported 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 musl Linux images are not supported.
No. Each detection returns its Symbology and exact Text string (preserving UPC-A and EAN-13 leading zeros), plus raw bytes and GS1 fields in report.Json. Query your own ERP or product catalogue separately.
Yes. Both Scanner.Scan and Scanner.ScanFrame are thread-safe and synchronous in process, allowing concurrent ASP.NET Core requests or background workers to invoke them safely.
When no barcode matches, report.Found is false and nothing is thrown (confirm that report.Complete is true). Invalid files, size-limit violations or invalid options throw ScanException with a typed Case and optional engine Code such as QRS-001.
No. The bundled native library executes 100% locally inside your .NET process with no external binary, zero network calls, no QR Code AI account, no API key and no creation credits.
Yes. Current releases carry the MIT licence for commercial and proprietary systems while retaining copyright and licence notices (see LICENSING.md). SDK use is separate from QR Code AI’s paid creation plans and seven-day Premium trial.