CodeGlyphX 1.1.0

dotnet add package CodeGlyphX --version 1.1.0
                    
NuGet\Install-Package CodeGlyphX -Version 1.1.0
                    
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="CodeGlyphX" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CodeGlyphX" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="CodeGlyphX" />
                    
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 CodeGlyphX --version 1.1.0
                    
#r "nuget: CodeGlyphX, 1.1.0"
                    
#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 CodeGlyphX@1.1.0
                    
#: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=CodeGlyphX&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=CodeGlyphX&version=1.1.0
                    
Install as a Cake Tool

CodeGlyphX - No-deps QR & Barcode Toolkit for .NET

CodeGlyphX is a fast, dependency-free toolkit for QR codes and barcodes, with robust decoding and a minimal API. It targets modern .NET as well as legacy .NET Framework, and includes renderers, payload helpers, and WPF controls.

Status: Actively developed Β· Stable core Β· Expanding format support

πŸ“¦ NuGet Package

nuget downloads nuget version

πŸ› οΈ Project Information

top language license build codecov

πŸ‘¨β€πŸ’» Author & Social

Twitter follow Blog LinkedIn Threads Discord

What it's all about

CodeGlyphX is a no-deps QR + barcode toolkit for .NET with:

  • Reliable QR decoding (ECI, FNC1/GS1, Kanji, structured append, Micro QR)
  • 1D barcode encoding/decoding (Code128/GS1-128, Code39, Code93, Code11, Codabar, MSI, Plessey, EAN/UPC, ITF-14)
  • 2D encoding/decoding (Data Matrix, MicroPDF417, PDF417, Aztec)
  • Renderers (SVG / SVGZ / HTML / PNG / JPEG / WebP / BMP / PPM / PBM / PGM / PAM / XBM / XPM / TGA / ICO / PDF / EPS / ASCII) and image decoding (PNG/JPEG/WebP/GIF/BMP/PPM/PBM/PGM/PAM/XBM/XPM/TGA/ICO/TIFF)
  • OTP helpers (otpauth://totp + Base32)
  • WPF controls + demo apps

Highlights

  • Zero external dependencies (no System.Drawing, no SkiaSharp, no ImageSharp)
  • Encode + decode for QR/Micro QR + common 1D/2D symbologies
  • Robust pixel decoder for screenshots, gradients, low-contrast, rotation/mirroring
  • Payload helpers for QR (WiFi, email/phone/SMS, contacts, calendar, payments, crypto, social, OTP)
  • Friendly APIs: one-liners + options + fluent presets

Roadmap & Website

  • Roadmap: ROADMAP.md

Installation

dotnet add package CodeGlyphX

Target Framework Feature Matrix

CodeGlyphX targets netstandard2.0, net472, net8.0, and net10.0. Most features are available everywhere, but the full QR pixel pipeline and Span-based APIs are net8+ only.

Feature net8.0 / net10.0 net472 / netstandard2.0
Encode (QR/Micro QR + 1D/2D symbologies) βœ… βœ…
Decode from module grids (BitMatrix) βœ… βœ…
Renderers + image file codecs (PNG/JPEG/SVG/PDF/etc) βœ… βœ…
1D/2D pixel decode (Barcode/DataMatrix/PDF417/Aztec) βœ… βœ…
QR pixel decode from raw pixels / screenshots βœ… ⚠️ Best-effort fallback (clean/generated images)
QR pixel debug rendering βœ… βœ–
Span-based overloads βœ… βœ– (byte[] only)

Notes:

  • netstandard2.0 and net472 require System.Memory 4.5.5 (automatically pulled by NuGet).
  • net8+ uses the full QR pixel pipeline; net472/netstandard2.0 use a best-effort fallback for QR image decode via QrImageDecoder and byte[] overloads.
  • Runtime checks are available via CodeGlyphXFeatures (e.g., SupportsQrPixelDecode, SupportsQrPixelDecodeFallback, SupportsQrPixelDebug).

net472 capability notes (QR from images):

  • βœ… Clean/generated PNG/JPEG QR renders (including large module sizes)
  • ⚠️ Multi-code screenshots, heavy styling/art, blur, warp, and low-contrast scenes are best-effort
  • βœ… Recommended: run the quick smoke checklist in Build/Net472-SmokeTest.md

Recommended pattern for shared code:

if (CodeGlyphXFeatures.SupportsQrPixelDecode &&
    QrImageDecoder.TryDecodeImage(bytes, QrPixelDecodeOptions.Screen(), out var decoded))
{
    Console.WriteLine(decoded.Text);
}
else
{
    // net472 fallback: decode from module grids or run QR pixel decode on a net8+ worker.
}

Choosing a target:

  • Pick net8.0/net10.0 when you need the most robust QR pixel decode from images/screenshots, pixel debug rendering, Span APIs, or maximum throughput.
  • Pick net472/netstandard2.0 for legacy apps; QR image decode is available via a best-effort fallback, but it is less robust on heavily styled/artistic inputs.

Decode (unified)

using CodeGlyphX;
using CodeGlyphX.Rendering;

var options = new CodeGlyphDecodeOptions {
    PreferBarcode = false,
    Qr = new QrPixelDecodeOptions {
        Profile = QrDecodeProfile.Robust,
        MaxMilliseconds = 800
    }
};

if (CodeGlyph.TryDecode(pixels, width, height, stride, PixelFormat.Rgba32, out var decoded, options)) {
    Console.WriteLine($"{decoded.Kind}: {decoded.Text}");
}

Diagnostics:

if (!CodeGlyph.TryDecode(pixels, width, height, stride, PixelFormat.Rgba32, out var decoded, out var diagnostics, options)) {
    Console.WriteLine(diagnostics.FailureReason);
    Console.WriteLine(diagnostics.Failure);
}

Presets for easy tuning:

var fast = CodeGlyphDecodeOptions.Fast();
var robust = CodeGlyphDecodeOptions.Robust();
var stylized = CodeGlyphDecodeOptions.Stylized();
var screen = CodeGlyphDecodeOptions.Screen(maxMilliseconds: 300, maxDimension: 1200);

Barcode checksum policy:

var options = new CodeGlyphDecodeOptions {
    ExpectedBarcode = BarcodeType.Code39,
    Code39Checksum = Code39ChecksumPolicy.StripIfValid,
    PreferBarcode = true
};

Cancellation and time budget:

using var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(500));

var options = new CodeGlyphDecodeOptions {
    Qr = new QrPixelDecodeOptions { Profile = QrDecodeProfile.Robust },
    CancellationToken = cts.Token
};

if (CodeGlyph.TryDecode(pixels, width, height, stride, PixelFormat.Rgba32, out var decoded, options)) {
    Console.WriteLine(decoded.Text);
}

Screen-friendly preset:

var options = CodeGlyphDecodeOptions.Screen(maxMilliseconds: 300, maxDimension: 1200);
if (CodeGlyph.TryDecode(pixels, width, height, stride, PixelFormat.Rgba32, out var decoded, options)) {
    Console.WriteLine(decoded.Text);
}

Supported .NET Versions and Dependencies

Core Library (CodeGlyphX)

  • .NET 10 / .NET 8 (Windows, Linux, macOS)
    • No external dependencies
  • .NET Standard 2.0 (Cross-platform compatibility)
    • System.Memory (4.5.5)
  • .NET Framework 4.7.2 (Windows only)
    • System.Memory (4.5.5)

Examples Project

  • .NET 8.0 only

WPF Projects

  • .NET 8.0 (windows) only

Platform support (at a glance)

Runs wherever .NET runs (Windows, Linux, macOS). WPF controls are Windows-only.

Feature Windows Linux macOS
Core encode/decode (QR/1D/2D) βœ… βœ… βœ…
Renderers (PNG/SVG/SVGZ/HTML/JPEG/WebP/BMP/PPM/PBM/PGM/PAM/XBM/XPM/TGA/ICO/PDF/EPS/ASCII) βœ… βœ… βœ…
Image decoding (PNG/JPEG/WebP/GIF/BMP/PPM/PBM/PGM/PAM/XBM/XPM/TGA/ICO/TIFF) βœ… βœ… βœ…
WPF controls βœ… ❌ ❌

Build Status

Cross-Platform Testing: Builds and tests run on Windows, Linux, and macOS. Windows additionally builds WPF and .NET Framework targets.

Benchmarks (local run)

Latest benchmark tables are generated into BENCHMARK.md (and Assets/Data/benchmark*.json). This README intentionally does not mirror benchmark tables to avoid drift. See BENCHMARK.md for the latest Windows/Linux/macOS quick and full runs, including timestamps and hardware details. Quick runs use fewer iterations but include the same scenario list as full runs (for BenchmarkDotNet tables). The QR pack runner uses a smaller quick pack set and adds art/stylized packs in full mode.

Performance checklist

Environment

  • Close heavy apps (indexers, browsers, video calls).
  • Use AC power and High Performance plan; avoid battery saver.
  • Reboot if the system has been running for a long time.

Build & preflight

  • dotnet --info (record SDK + runtime versions).
  • dotnet build CodeGlyphX.sln
  • dotnet run -c Release --project CodeGlyphX.Benchmarks -- --preflight

Quick run (sanity)

  • bash Build/run-benchmarks-compare.sh --no-compare --base-filter '*QrDecode*'
  • Generate report:
    • python3 Build/generate-benchmark-report.py --artifacts-path <artifacts> --framework net8.0 --configuration Release --run-mode quick

Full run (publishable)

  • bash Build/run-benchmarks-compare.sh
  • Generate report:
    • python3 Build/generate-benchmark-report.py --artifacts-path <artifacts> --framework net8.0 --configuration Release --run-mode full

Regression triage

  • Re-run the same filter twice to confirm regressions.
  • Use QR diagnostics knobs if needed:
    • CODEGLYPHX_DIAG_QR_MAXMS, CODEGLYPHX_DIAG_QR_AGG, CODEGLYPHX_DIAG_QR_DISABLE_TRANSFORMS
  • Capture before/after benchmark tables in the PR summary.

Docs/artifacts

  • Update BENCHMARK.md and Assets/Data/benchmark*.json.
  • If public API docs changed, regenerate website docs: pwsh Build/Build-Website.ps1.

Run benchmarks

dotnet run -c Release --framework net8.0 --project CodeGlyphX.Benchmarks/CodeGlyphX.Benchmarks.csproj -- --filter "*"

Run comparison benchmarks (external libraries)

Comparison benchmarks are opt-in so the default benchmark project stays dependency-free. Enable them with MSBuild properties:

# all external comparisons
dotnet run -c Release --framework net8.0 --project CodeGlyphX.Benchmarks/CodeGlyphX.Benchmarks.csproj /p:CompareExternal=true -- --filter "*Compare*"

# per-library toggles
dotnet run -c Release --framework net8.0 --project CodeGlyphX.Benchmarks/CodeGlyphX.Benchmarks.csproj /p:CompareZXing=true -- --filter "*Compare*"
dotnet run -c Release --framework net8.0 --project CodeGlyphX.Benchmarks/CodeGlyphX.Benchmarks.csproj /p:CompareQRCoder=true -- --filter "*Compare*"
dotnet run -c Release --framework net8.0 --project CodeGlyphX.Benchmarks/CodeGlyphX.Benchmarks.csproj /p:CompareBarcoder=true -- --filter "*Compare*"

Notes:

  • Comparisons target PNG output and use each library’s ImageSharp-based renderer where applicable.
  • Run the same command on Windows and Linux to compare OS-level differences.

Supported Symbologies

All symbologies can be rendered to any output format listed below. Matrix/stacked/4-state symbols use a BitMatrix + the Matrix* renderers.

QR family

Symbology Encode Decode Notes
QR βœ… βœ… ECI, FNC1/GS1, Kanji, structured append
Micro QR βœ… βœ… Versions M1–M4

2D matrix / stacked / 4-state (BitMatrix)

Symbology Encode Decode Notes
Data Matrix βœ… βœ… ASCII/C40/Text/X12/EDIFACT/Base256
PDF417 βœ… βœ… Macro PDF417 metadata
MicroPDF417 βœ… βœ… Module matrix encode/decode
Aztec βœ… βœ… Pixel decode via AztecCode.TryDecodeImage
GS1 DataBar-14 Omni / Stacked βœ… βœ… Matrix renderers
GS1 DataBar Expanded Stacked βœ… βœ… Matrix renderers
Pharmacode (two-track) βœ… βœ… Numeric 4–64570080
KIX βœ… βœ… Headerless 4-state
Royal Mail 4-State (RM4SCC) βœ… βœ… Encodes with headers by default
POSTNET / PLANET βœ… βœ… 4-state, checksum
Australia Post βœ… βœ… Standard + Customer 2/3; decode may be ambiguous for numeric-only Customer 3
Japan Post βœ… βœ… 67-bar 4-state
USPS Intelligent Mail (IMB) βœ… βœ… 65-bar 4-state, tracking + routing (5/9/11)

1D linear

Symbology Encode Decode Notes
Code128 βœ… βœ… Set A/B/C
GS1-128 βœ… βœ… FNC1 + AI helpers
Code39 βœ… βœ… Optional checksum
Code93 βœ… βœ… Optional checksum
Code11 βœ… βœ… Optional checksum
Codabar βœ… βœ… A/B/C/D start/stop
MSI βœ… βœ… Mod10 / Mod10Mod10
Plessey βœ… βœ… CRC
Telepen βœ… βœ… ASCII 0–127
Pharmacode (one-track) βœ… βœ… Numeric 3–131070
Code 32 (Italian Pharmacode) βœ… βœ… 8 digits + checksum
EAN-8 / EAN-13 βœ… βœ… +2/+5 add-ons
UPC-A / UPC-E βœ… βœ… +2/+5 add-ons
ITF-14 βœ… βœ… Checksum validation
ITF (Interleaved 2 of 5) βœ… βœ… Even-length digits, optional checksum
Industrial 2 of 5 βœ… βœ… Optional checksum
Matrix 2 of 5 βœ… βœ… Optional checksum
IATA 2 of 5 βœ… βœ… Optional checksum
Patch Code βœ… βœ… Single symbol (1,2,3,4,6,T)
GS1 DataBar-14 Truncated βœ… βœ… GTIN-13 input (check digit computed)
GS1 DataBar Expanded βœ… βœ… GS1 AI strings (linear)

Features

  • QR encode + robust decode
  • Micro QR support
  • 1D barcode encode + decode
  • Data Matrix + MicroPDF417 + PDF417 encode + decode
  • Matrix/stacked/4-state encoding (Data Matrix / PDF417 / MicroPDF417 / Aztec / GS1 DataBar / postal + pharmacode) with dedicated matrix renderers
  • SVG / SVGZ / HTML / PNG / JPEG / WebP / BMP / PPM / PBM / PGM / PAM / XBM / XPM / TGA / ICO / PDF / EPS / ASCII renderers
  • Image decode: PNG / JPEG / WebP / GIF / BMP / PPM / PBM / PGM / PAM / XBM / XPM / TGA / ICO / TIFF
  • Base64 + data URI helpers for rendered outputs
  • Payload helpers (URL, WiFi, Email, Phone/SMS/MMS, Contact, Calendar, OTP, payments, crypto, social)
  • WPF controls and demo apps
  • Aztec encode + decode (module matrix + pixel)
  • Matrix render helpers for Aztec/DataMatrix/PDF417 (PNG/SVG/SVGZ/HTML/JPEG/WebP/BMP/PPM/PBM/PGM/PAM/XBM/XPM/TGA/ICO/PDF/EPS/ASCII)

AOT & trimming

CodeGlyphX is AOT-friendly (no reflection, no runtime codegen) and ships with trimming/AOT analyzers enabled for .NET 8+ targets. Recommended publish flags: PublishAot=true (native), or PublishTrimmed=true (size) for app projects.

Output formats (Save by extension)

Save(...) chooses the output based on file extension for QR/Barcode/DataMatrix/PDF417/Aztec. For other matrix barcodes (e.g., KIX/Royal Mail 4‑State), use the Matrix* renderers with a BitMatrix from MatrixBarcodeEncoder. Use .txt for ASCII output and .ps as an EPS alias.

Format Extensions Notes
PNG .png Raster
JPEG .jpg, .jpeg Raster, quality via options
WebP .webp Raster, quality via options (lossless at quality 100)
BMP .bmp Raster
PPM .ppm Raster (portable pixmap)
PBM .pbm Raster (portable bitmap)
PGM .pgm Raster (portable graymap)
PAM .pam Raster (portable anymap, RGBA)
XBM .xbm Text (1-bit)
XPM .xpm Text (2-color)
TGA .tga Raster
ICO .ico Raster (PNG inside, multi-size by default)
SVG .svg Vector
SVGZ .svgz, .svg.gz Vector (gzip-compressed SVG)
HTML .html, .htm Table-based output
PDF .pdf Vector by default, raster via RenderMode
EPS .eps, .ps Vector by default, raster via RenderMode
ASCII .txt Text output (also via Render(..., OutputFormat.Ascii))
Raw RGBA API only Use RenderPixels methods

Render to bytes or text

using CodeGlyphX;
using CodeGlyphX.Rendering;

var svg = Barcode.Render(BarcodeType.Code128, "CODE128-12345", OutputFormat.Svg).GetText();
var png = QrCode.Render("https://example.com", OutputFormat.Png).Data;

// HTML title + PDF/EPS vector/raster output
var extras = new RenderExtras { HtmlTitle = "My Code", VectorMode = RenderMode.Raster };
Barcode.Save(BarcodeType.Code128, "CODE128-12345", "barcode.html", extras: extras);

Per-format helpers (e.g., Png, Svg, SavePng) remain for convenience, but new code should prefer Render(..., OutputFormat) to keep output handling consistent.

ICO multi-size

using CodeGlyphX;

var opts = new QrEasyOptions {
    IcoSizes = new[] { 32, 64, 128 },
    IcoPreserveAspectRatio = true
};
QR.Save("https://example.com", "qr.ico", opts);

Payload helpers

QR payload helpers generate well-known structured strings so scanners can trigger the right action.

Category Payloads
Core Text, URL, Bookmark, WiFi
Communication Email (Mailto/MATMSG/SMTP), Phone, SMS, MMS, Skype, WhatsApp
Location & Calendar Geo, Calendar (iCal/vEvent)
Contacts vCard / MeCard
OTP TOTP / HOTP (otpauth://)
Social & Stores App Store (Apple/Google), Facebook, X/Twitter, TikTok, LinkedIn
Payments PayPal.Me, UPI, SEPA Girocode (EPC), BezahlCode (contact/payment/debit/periodic), Swiss QR Bill, Slovenian UPN, Russia Payment Order (ST00012)
Crypto & Network Bitcoin / Bitcoin Cash / Litecoin, Monero, ShadowSocks

Auto-detect helper: QrPayloads.Detect("...") builds the best-known payload for mixed inputs.

Image format support

Raster formats (encode + decode)

Format Encode Decode Notes
PNG βœ… βœ…
JPEG βœ… βœ…
WebP βœ… βœ… Managed VP8/VP8L; ImageReader returns first animation frame (WebpReader exposes frames)
BMP βœ… βœ…
GIF βœ– βœ… First frame only
TIFF βœ– βœ… Baseline strips, 8/16-bit; compression: none/PackBits/LZW/Deflate
PPM/PGM/PAM/PBM βœ… βœ…
TGA βœ… βœ…
ICO βœ… βœ… PNG/BMP payloads (CUR decode supported)
XBM/XPM βœ… βœ…

Vector / text outputs (encode only)

Format Encode Notes
SVG / SVGZ βœ… Vector output
PDF / EPS βœ… Vector by default, raster via RenderMode
HTML βœ… Table-based output
ASCII βœ… .txt output or Render(..., OutputFormat.Ascii)
Raw RGBA βœ… Use RenderPixels APIs

Known gaps / not supported (decode)

  • ImageReader returns the first animation frame only (GIF/WebP); use WebpReader.* for raw or composited WebP frames
  • Managed WebP decode supports VP8/VP8L stills; size limit is 256 MB
  • Managed WebP encode is VP8 (lossy intra-only) and VP8L (lossless)
  • AVIF, HEIC, JPEG2000, PSD are not supported
  • Multi-page / tiled TIFF is not supported (first IFD only)
  • PDF/PS decode is not supported (rasterize first)

Format corpus (optional)

  • Image format corpus: CodeGlyphX.Tests/Fixtures/ImageSamples/manifest.json
    Download with pwsh Build/Download-ImageSamples.ps1 (or set CODEGLYPHX_IMAGE_SAMPLES).
  • External barcode/QR samples: CodeGlyphX.Tests/Fixtures/ExternalSamples/manifest.json
    Download with pwsh Build/Download-ExternalSamples.ps1 (or set CODEGLYPHX_EXTERNAL_SAMPLES).

Quick usage

using CodeGlyphX;

QR.Save("https://example.com", "qr.png");
QR.Save("https://example.com", "qr.svg");
QR.Save("https://example.com", "qr.jpg");
QR.Save("https://example.com", "qr.pdf");
using CodeGlyphX;

// Simple styling (colored eyes + rounded modules)
var opts = new QrEasyOptions {
    ModuleShape = QrPngModuleShape.Rounded,
    ModuleCornerRadiusPx = 3,
    Eyes = new QrPngEyeOptions {
        UseFrame = true,
        OuterShape = QrPngModuleShape.Circle,
        InnerShape = QrPngModuleShape.Circle,
        OuterColor = new Rgba32(220, 20, 60),
        InnerColor = new Rgba32(220, 20, 60),
    }
};
QR.Save("https://example.com", "qr-styled.png", opts);

High-resolution output (print / large displays)

For large displays or print, render at a higher pixel size using TargetSizePx or a larger ModuleSize. Vector output (SVG/PDF) is ideal when your style stays vector-friendly (no gradients/palettes/logos).

using CodeGlyphX;

var opts = new QrEasyOptions {
    TargetSizePx = 1200,
    TargetSizeIncludesQuietZone = true,
    BackgroundSupersample = 2 // smoother gradients/patterns
};
QR.Save("https://example.com", "qr-1200.png", opts);

Examples: see CodeGlyphX.Examples output files (qr-print-4k.png, qr-print-8k.png, qr-print-8k.pdf) for print-ready presets.

using CodeGlyphX;
using CodeGlyphX.Rendering;

// PDF/EPS are vector by default. Use Raster when you need pixels.
QR.SavePdf("https://example.com", "qr-raster.pdf", mode: RenderMode.Raster);

Rendering pipeline notes (PNG)

  • Layout: compute quiet-zone, module grid, and output pixel size.
  • Background: solid/gradient/pattern fill (optional supersample for smoother gradients/patterns).
  • Modules: shape + scale map + palette/gradient, then eyes, then logo overlay.
  • Canvas/debug: optional sticker canvas + debug overlays as final passes.

Notes:

  • Vector PDF/EPS support square/rounded/circle modules and eye shapes.
  • Gradients and logos automatically fall back to raster to preserve appearance.
  • PDF/EPS are output-only. For decoding, rasterize to PNG/BMP/PPM/PBM/PGM/PAM/TGA and use the image decoders.
  • Logo background plates auto-bump the minimum QR version to 8 by default for scan safety (disable with AutoBumpVersionForLogoBackground or set LogoBackgroundMinVersion = 0).
using CodeGlyphX;

Barcode.Save(BarcodeType.Code128, "CODE128-12345", "code128.png");
Barcode.Save(BarcodeType.Code128, "CODE128-12345", "code128.pdf");
Barcode.Save(BarcodeType.Code128, "CODE128-12345", "code128.eps");
using CodeGlyphX;

// One-liners with defaults
var png = BarcodeEasy.RenderPng(BarcodeType.Code128, "CODE128-12345");
using CodeGlyphX;

DataMatrixCode.Save("DataMatrix-12345", "datamatrix.png");
DataMatrixCode.Save("DataMatrix-12345", "datamatrix.pdf");
DataMatrixCode.Save("DataMatrix-12345", "datamatrix.eps");
Pdf417Code.Save("PDF417-12345", "pdf417.png");
Pdf417Code.Save("PDF417-12345", "pdf417.pdf");
Pdf417Code.Save("PDF417-12345", "pdf417.eps");

Payload helpers (3 lines each)

using CodeGlyphX;
using CodeGlyphX.Payloads;

QR.Save(QrPayloads.Url("https://example.com"), "url.png");
QR.Save(QrPayloads.Wifi("MyWiFi", "p@ssw0rd"), "wifi.png");
QR.Save(QrPayloads.OneTimePassword(OtpAuthType.Totp, "JBSWY3DPEHPK3PXP", label: "user@example.com", issuer: "AuthIMO"), "otp.png");

Decode (pixels or images)

using CodeGlyphX;

if (QrImageDecoder.TryDecodeImage(File.ReadAllBytes("code.bmp"), out var decoded)) {
    Console.WriteLine(decoded.Text);
}
using CodeGlyphX;

var options = QrPixelDecodeOptions.Fast();
if (QrImageDecoder.TryDecodeImage(File.ReadAllBytes("screen.png"), options, out var decoded)) {
    Console.WriteLine(decoded.Text);
}
using CodeGlyphX;

var options = QrPixelDecodeOptions.Screen(maxMilliseconds: 300, maxDimension: 1200);
if (QrImageDecoder.TryDecodeImage(File.ReadAllBytes("screen.png"), options, out var decoded)) {
    Console.WriteLine(decoded.Text);
}
using CodeGlyphX;

var bytes = File.ReadAllBytes("screen.png");
if (QR.TryDecodeImage(bytes, QrPixelDecodeOptions.Screen(), out var decoded)) {
    Console.WriteLine(decoded.Text);
}
using CodeGlyphX;

if (!QrImageDecoder.TryDecodeImage(File.ReadAllBytes("screen.png"), out var decoded, out var info)) {
    QrDiagnosticsDump.WriteText("decode-diagnostics.txt", info, source: "screen.png");
}
using CodeGlyphX;

if (CodeGlyph.TryDecodeAllPng(File.ReadAllBytes("unknown.png"), out var results)) {
    foreach (var item in results) Console.WriteLine($"{item.Kind}: {item.Text}");
}

Decode (3 lines each)

using CodeGlyphX;

if (Barcode.TryDecodeImage(File.ReadAllBytes("code.png"), BarcodeType.Code128, out var barcode))
    Console.WriteLine(barcode.Text);
using CodeGlyphX;

if (DataMatrixCode.TryDecodeImage(File.ReadAllBytes("dm.png"), out var text))
    Console.WriteLine(text);
using CodeGlyphX;

if (Pdf417Code.TryDecodeImage(File.ReadAllBytes("pdf417.png"), out var text))
    Console.WriteLine(text);
using CodeGlyphX;

if (AztecCode.TryDecodeImage(File.ReadAllBytes("aztec.png"), out var text))
    Console.WriteLine(text);
using CodeGlyphX;

var opts = ImageDecodeOptions.Screen(maxMilliseconds: 300, maxDimension: 1200);
Barcode.TryDecodePng(File.ReadAllBytes("barcode.png"), BarcodeType.Code128, opts, out var barcode);

WPF controls

xmlns:wpf="clr-namespace:CodeGlyphX.Wpf;assembly=CodeGlyphX.Wpf"
<wpf:QrCodeControl Text="{Binding QrText}" Ecc="M" ModuleSize="6" QuietZone="4" />
<wpf:Barcode128Control Value="{Binding BarcodeValue}" ModuleSize="2" QuietZone="10" />

License

Apache-2.0.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

  • .NETStandard 2.0

  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 97 1/30/2026
1.0.0 205 1/20/2026