Oscore.QrCodes 0.9.1

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Oscore.QrCodes --version 0.9.1                
NuGet\Install-Package Oscore.QrCodes -Version 0.9.1                
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="Oscore.QrCodes" Version="0.9.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Oscore.QrCodes --version 0.9.1                
#r "nuget: Oscore.QrCodes, 0.9.1"                
#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 Oscore.QrCodes as a Cake Addin
#addin nuget:?package=Oscore.QrCodes&version=0.9.1

// Install Oscore.QrCodes as a Cake Tool
#tool nuget:?package=Oscore.QrCodes&version=0.9.1                

QrCodes

Modern cross-platform QR code generation, rendering and serialization.
Based on QRCoder with ImageSharp support.

🔥 Features 🔥

  • Use ImageSharp instead of System.Drawing to be cross-platform.
  • Support latest dotnet versions.
  • Generate QR code with logo image.
  • Supports next payloads
    • BezahlCode
    • Bitcoin like address
    • Bookmark
    • CalendarEvent
    • ContactData
    • Geolocation
    • Girocode
    • Mail
    • MMS
    • MoneroTransaction
    • OneTimePassword
    • PhoneNumber
    • ShadowSocksConfig
    • SkypeCall
    • SloveniaUpnQR
    • SMS
    • SwissQRCode
    • Url
    • WhatsAppMessage
    • Telegram
    • Wi-Fi
  • Supports next renderers
    • Ascii
    • Base64
    • SVG
    • PostScript
    • PNG - fast but not support all features
    • Bitmap(.bmp) - fast but not support all features
    • ImageSharp - powerful, allows many features and export formats
    • PDF - powered by ImageSharp

Usage

dotnet add package QrCodes // Base library with all payloads and some renderers(Ascii, Base64, Bitmap, PNG, SVG, PostScript)
dotnet add package QrCodes.ImageSharp // ImageSharpRenderer(Gif, Jpeg, Png, Tiff, WebP, Bmp, Pbm, Tga), Export to PDF
dotnet add package QrCodes.Maui // MAUI helpers(QrCodeSource and QrCodeExtension markup extension)
Generate QR code with logo image
var qrCode = QrCodeGenerator.Generate(
    plainText: new Telegram(user: "havendv").ToString(),
    eccLevel: ErrorCorrectionLevel.High);
var image = ImageSharpRenderer.Render(
    data: qrCode,
    pixelsPerModule: 5,
    darkColor: Color.Black,
    lightColor: Color.White,
    drawQuietZones: false);
Generate ImageSource for MAUI

You can test all variants using QrCodes.SampleApp MAUI app

xmlns:qr="https://qr.codes/"
<Image Source="{qr:QrCode 'Fixed value'}" />

Benchmarks

You can view the reports for each version here


BenchmarkDotNet v0.13.12, macOS Sonoma 14.2.1 (23C71) [Darwin 23.2.0]
Apple M1 Pro, 1 CPU, 10 logical and 10 physical cores
.NET SDK 8.0.100
  [Host]     : .NET 8.0.0 (8.0.23.53103), Arm64 RyuJIT AdvSIMD
  DefaultJob : .NET 8.0.0 (8.0.23.53103), Arm64 RyuJIT AdvSIMD

Categories=Renderers  

Method Mean Ratio Gen0 Gen1 Gen2 Allocated Alloc Ratio
ImageSharpRenderer_Png 410.57 μs 1.00 1.9531 0.4883 - 47.93 KB 1.00
PngRenderer_ 43.58 μs 0.11 0.8545 - - 5.39 KB 0.11
BitmapRenderer_ 381.96 μs 0.93 220.2148 220.2148 36.6211 368.75 KB 7.69
SvgRenderer_ 41.01 μs 0.10 8.9111 0.3662 - 54.95 KB 1.15

It was forked from the QRCoder-ImageSharp project.
QRCoder is a project by Raffael Herrmann and was first released in 10/2013.
QRCoder-ImageSharp is a project by Joerg Plenert.
It's licensed under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  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 is compatible.  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. 
.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 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  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.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on Oscore.QrCodes:

Package Downloads
Oscore.QrCodes.ImageSharp

Modern cross-platform QR code generation, rendering and serialization.

Oscore.QrCodes.SkiaSharp

Modern cross-platform QR code generation, rendering and serialization.

Oscore.QrCodes.Maui

Modern cross-platform QR code generation, rendering and serialization.

Oscore.QrCodes.System.Drawing

Modern cross-platform QR code generation, rendering and serialization.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.6 1,335 9/1/2024
1.0.5 199 9/1/2024
1.0.4 2,035 3/18/2024
1.0.3 239 1/31/2024
1.0.2 899 1/29/2024
1.0.0 249 1/25/2024
0.9.3 245 1/25/2024
0.9.2 4,342 1/18/2024
0.9.1 141 1/17/2024
0.9.0 161 1/17/2024
0.0.0-dev 177 9/1/2024