Lyo.QRCode.QRCoder
3.0.0
dotnet add package Lyo.QRCode.QRCoder --version 3.0.0
NuGet\Install-Package Lyo.QRCode.QRCoder -Version 3.0.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="Lyo.QRCode.QRCoder" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Lyo.QRCode.QRCoder" Version="3.0.0" />
<PackageReference Include="Lyo.QRCode.QRCoder" />
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 Lyo.QRCode.QRCoder --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Lyo.QRCode.QRCoder, 3.0.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 Lyo.QRCode.QRCoder@3.0.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=Lyo.QRCode.QRCoder&version=3.0.0
#tool nuget:?package=Lyo.QRCode.QRCoder&version=3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Lyo.QRCode.QRCoder
IQRCodeService from Lyo.QRCode implemented with QRCoder. Pick this for JPEG / Bitmap on Windows or for QRCoder's renderers. BuiltInQRCodeService is
the in-library ISO encoder with no extra NuGet.
Examples
Generate with QRCoder
using Lyo.QRCode;
using Lyo.QRCode.Models;
using Lyo.QRCode.QRCoder;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddQRCoderQrCodeService(o => {
o.DefaultSize = 16; // pixels per module
o.DefaultFormat = QRCodeFormat.Png; // Jpeg / Bmp also supported via QRCoder
o.DefaultErrorCorrectionLevel = QRCodeErrorCorrectionLevel.Medium;
});
var qr = services.BuildServiceProvider().GetRequiredService<IQRCodeService>();
var result = await qr.GenerateAsync("https://example.com");
Bind options from configuration
services.AddQRCoderQrCodeServiceFromConfiguration(builder.Configuration);
appsettings sample
{
"QRCodeService": {
"DefaultSize": 16,
"DefaultFormat": "Png",
"DefaultErrorCorrectionLevel": "Medium",
"MinSize": 1,
"MaxSize": 2000,
"EnableMetrics": false
}
}
Types
| Type | Description |
|---|---|
QRCoderQRCodeService |
IQRCodeService implementation. No image dependencies. Logo, frame, caption, and padding are the caller's job through Lyo.Images.IImageDecorationService. |
QRCoderQrCodeServiceExtensions |
Container helpers: AddQRCoderQrCodeService(Action<QRCodeServiceOptions>?), AddQRCoderQrCodeService(QRCodeServiceOptions), AddQRCoderQrCodeServiceFromConfiguration(IConfiguration, sectionName?). |
Platform and decoration
- JPEG / Bitmap go through
System.Drawingand run on Windows. PNG/SVG paths are cross-platform. ReadFromImageAsyncdecoding usesQRCodeZxingReadin this package (ZXing.Net + ImageSharp), matching the built-in service.- Decoration is out of scope. Center logos and frames are no longer applied by the QRCoder service. Send the returned bytes through
Lyo.Images.IImageDecorationService.Pipeline(...)and callOverlay/AddFrame/AddCaption/AddOuterPaddingas needed (see theLyo.ImagesREADME).
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.QRCode(direct, lyo)Lyo.Result(direct, lyo)Microsoft.Extensions.Configuration.Binder10.0.5(direct, microsoft)Microsoft.Extensions.DependencyInjection.Abstractions10.0.5(direct, microsoft)Microsoft.Extensions.Logging.Abstractions10.0.5(direct, microsoft)QRCoder1.8.0(direct, third-party)Lyo.Common.Core(transitive, lyo)Lyo.Exceptions(transitive, lyo)Lyo.Metrics(transitive, lyo)Microsoft.Bcl.AsyncInterfaces10.0.5(transitive, microsoft, netstandard2.0)SixLabors.ImageSharp3.1.12(transitive, third-party)System.Memory4.6.3(transitive, microsoft, netstandard2.0)System.Text.Json10.0.5(transitive, microsoft, netstandard2.0)ZXing.Net0.16.11(transitive, third-party)ZXing.Net.Bindings.ImageSharp.V30.16.18(transitive, third-party)
| Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Lyo.QRCode (>= 3.0.0)
- Lyo.Result (>= 3.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.5)
- QRCoder (>= 1.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.