Bit.BbScanner 11.0.0-pre-12

This is a prerelease version of Bit.BbScanner.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Bit.BbScanner --version 11.0.0-pre-12
                    
NuGet\Install-Package Bit.BbScanner -Version 11.0.0-pre-12
                    
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="Bit.BbScanner" Version="11.0.0-pre-12" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bit.BbScanner" Version="11.0.0-pre-12" />
                    
Directory.Packages.props
<PackageReference Include="Bit.BbScanner" />
                    
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 Bit.BbScanner --version 11.0.0-pre-12
                    
#r "nuget: Bit.BbScanner, 11.0.0-pre-12"
                    
#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 Bit.BbScanner@11.0.0-pre-12
                    
#: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=Bit.BbScanner&version=11.0.0-pre-12&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Bit.BbScanner&version=11.0.0-pre-12&prerelease
                    
Install as a Cake Tool

Bit.BbScanner

A dependency-free, high performance barcode scanner for Blazor: QR Code, Micro QR, Data Matrix, PDF417, Aztec, MaxiCode, Code 128, Code 39, Code 93, Codabar, EAN-13, EAN-8, UPC-A, UPC-E (with their add-ons), ITF, GS1 DataBar (with its stacked forms), DataBar Limited and DataBar Expanded, from the camera or from still images. The decoding - luminance conversion, binarization, detection, Reed-Solomon correction and bit stream parsing - is written in C#. JavaScript only opens the camera and copies pixels - there is no barcode SDK or JavaScript scanner library underneath.

Quick start

dotnet add package Bit.BbScanner
@* _Imports.razor *@
@using Bit.BbScanner

No services to register and no stylesheet to reference: the package's Blazor initializer injects _content/Bit.BbScanner/bit-bbscanner.css automatically.

@rendermode InteractiveWebAssembly

<BbScanner Formats="BbBarcodeFormat.QrCode | BbBarcodeFormat.Ean13"
           Region="BbScanRegion.CenteredSquare(0.7)"
           OnScan="HandleScan"
           OnError="e => _error = e" />

@code {
    private BbScannerException? _error;

    private void HandleScan(BbBarcodeResult result)
        => Console.WriteLine($"{result.Format}: {result.Text}");
}

Camera scanning runs on Blazor WebAssembly - a standalone app, or the WebAssembly pages of a Blazor Web App - and needs a secure context (HTTPS or localhost). Publish that client compiled ahead of time (<RunAOTCompilation>true</RunAOTCompilation>): on Blazor's default interpreter a 640x480 frame took about 100 ms in Chromium on a desktop, compiled about 1 ms. The decoder itself runs anywhere .NET runs:

using var decoder = new BbBarcodeDecoder(BbScannerOptions.ForStillImages());
var result = decoder.Decode(rgbaPixels, width, height, BbPixelFormat.Rgba32);

Features

  • Eighteen symbologies read to specification, checked against symbols written by an independent encoder; PDF417, Aztec, MaxiCode and Micro QR at any orientation.
  • One copy per frame: frames reach managed memory through a [JSImport] memory view, with no JSON or base64.
  • No garbage per frame: buffers, bit planes and detectors are reused, so an empty frame allocates nothing on the linear path.
  • Misreads guarded against: check digits, guard patterns and repeated reads are verified before a value is reported.
  • Camera selection, torch and zoom; still image scanning through a built-in file picker or DecodeImage.
  • Scan regions, render fragment overlays and message templates, and theming through CSS custom properties.
  • A labelled, keyboard-operable scanner that announces results and alerts failures, every text translatable through BbScannerTexts, with right-to-left, reduced motion and forced colours support, and an optional vibration or beep.
  • A camera the phone ends when the page goes into the background is reopened when it returns; ReleaseCameraWhenHidden closes it whenever the page is hidden.
  • .NET 10 and 11.

For AI agents

The demo site hosts an MCP server at https://bbscanner.bitplatform.dev/mcp that answers from the shipped library: its API, its guide, its symbologies, a decode lab and the demo's working pages.

Documentation

The full guide - symbologies, the component's parameters, events and methods, still images, styling, the decoder outside Blazor, hosting models, errors and permissions, what it reads, performance and architecture - is in the BbScanner README. See it running at bbscanner.bitplatform.dev.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bit.BbScanner:

Package Downloads
Bit.BbScanner.Maui

Bit.BbScanner.Maui

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.0-pre-15 49 10/27/2026
11.0.0-pre-14 56 10/26/2026
11.0.0-pre-13 54 10/26/2026
11.0.0-pre-12 49 10/26/2026
11.0.0-pre-11 61 10/25/2026
11.0.0-pre-10 66 10/18/2026
10.7.0 102 10/25/2026
10.7.0-pre-04 88 10/25/2026
10.7.0-pre-03 80 10/22/2026
10.7.0-pre-02 89 10/22/2026