Nerdbank.QRCodes 0.2.50-beta

Prefix Reserved
This is a prerelease version of Nerdbank.QRCodes.
dotnet add package Nerdbank.QRCodes --version 0.2.50-beta                
NuGet\Install-Package Nerdbank.QRCodes -Version 0.2.50-beta                
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="Nerdbank.QRCodes" Version="0.2.50-beta" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nerdbank.QRCodes --version 0.2.50-beta                
#r "nuget: Nerdbank.QRCodes, 0.2.50-beta"                
#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.
// Install Nerdbank.QRCodes as a Cake Addin
#addin nuget:?package=Nerdbank.QRCodes&version=0.2.50-beta&prerelease

// Install Nerdbank.QRCodes as a Cake Tool
#tool nuget:?package=Nerdbank.QRCodes&version=0.2.50-beta&prerelease                

Nerdbank.QRCodes

Features

  • Decode a QR code from a high quality render or a photo with a QR code somewhere in the image.
  • Encode data in a QR code (using the excellent QRCoder library) supporting several graphic formats (some Windows only) and even as ASCII art.

Usage

Create a QR code

There are lots of options for customizing QR codes including style, image in the center, colors, and output image format. Following is a basic example.

using QRCoder;

QREncoder encoder = new();
QRCodeGenerator generator = new();
QRCodeData data = generator.CreateQrCode("https://some.url", encoder.ECCLevel);
encoder.Encode(data, "some.png", traceSource: null);

Decode a QR code

Decoding a QR code is very straightforward.

using Bitmap bitmap = (Bitmap)Image.FromFile("some.jpg");
if (QRDecoder.TryDecode(bitmap, out string? data))
{
	Console.WriteLine(data);
}
Product Compatible and additional computed target framework versions.
.NET 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.  net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.2.50-beta 375 7/23/2024
0.2.45-beta 121 7/10/2024
0.2.9-beta 4,057 10/3/2023