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 applications using 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 are thread-safe across concurrent .NET tasks.
Filter 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 tested on .NET 8 and .NET 10 (.NET 10 is Microsoft’s current LTS release).
Includes native libraries for Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine / musl Linux is not covered.
dotnet add package QRCodeAI.QRCodeBarcodeScanner
No external CLI binary or Rust toolchain is required; the managed package loads its bundled native UniFFI library in-process.
Fresh-install verification runs across all five supported OS/architecture platforms.
Pass encoded label bytes (PNG, JPEG, WebP or GIF) and ScanOptions.Formats to Scanner.Scan so only the requested barcode readers run.
To test with a known fixture, 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 needed.
For a Code 128 label encoding STOCK-4827, detection.Symbology is "code128" and detection.Text is "STOCK-4827". A UPC-A code such as 012345678905 stays a C# string with its leading zero intact.
No matching barcode sets report.Found to false without throwing. Invalid files or unknown options throw ScanException with Case and 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 lookups separate.
Runtime floors and MIT licence. Supports .NET 8 and .NET 10 on 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, 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 tested on .NET 8 and .NET 10 (.NET 10 is the supported LTS release). Native libraries ship for Linux x64/arm64 (glibc 2.28+), macOS Intel (10.15+) and Apple Silicon (11+), and Windows x64. Alpine / musl Linux is not covered.
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, so multiple concurrent requests or background workers can invoke them safely.
No matching barcode sets report.Found to false without throwing (confirm report.Complete is true). Invalid files, size-limit violations or invalid options are signalled by throwing ScanException with a typed Case and optional engine Code such as QRS-001.
No. The bundled native library runs 100% locally inside your .NET process with no external binary, no network calls, no QR Code AI account, no API key and no creation credits.
Yes. Current releases are MIT-licensed for commercial and proprietary applications 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.