Jc.QRCode 1.0.3

dotnet add package Jc.QRCode --version 1.0.3
NuGet\Install-Package Jc.QRCode -Version 1.0.3
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="Jc.QRCode" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Jc.QRCode --version 1.0.3
#r "nuget: Jc.QRCode, 1.0.3"
#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 Jc.QRCode as a Cake Addin
#addin nuget:?package=Jc.QRCode&version=1.0.3

// Install Jc.QRCode as a Cake Tool
#tool nuget:?package=Jc.QRCode&version=1.0.3

Jc.QRCode

二维码生成模块

全面支持 Linux,Windows,Mac

dotnet add package  Jc.QRCode

生成二维码

实例化

Jc.QRCode.JcQRCode qr = new JcQRCode();

生成二维码文件

    /// <summary>
    /// 生成二维码
    /// </summary>
    /// <param name="text">文本内容</param>
    /// <param name="outPath">输出位置</param>
    /// <param name="format">文件格式</param>
    /// <param name="width">宽度</param>
    /// <param name="height">高度</param>
    /// <param name="logoImgae">logo路径</param>
    /// <param name="keepWhiteBorderPixelVal">白边处理(负值表示不做处理,最大值不超过真实二维码区域的1/10)</param>
    /// <returns></returns>
    public bool Create(
        string text,
        string outPath,
        SKEncodedImageFormat format = SKEncodedImageFormat.Png,
        int width = 320,
        int height = 320,
        string logoImgae = null,
        int keepWhiteBorderPixelVal = -1)
返回二维码Byte[]
    /// <summary>
    /// 生成二维码
    /// </summary>
    /// <param name="text">文本内容</param>
    /// <param name="format">保存格式</param>
    /// <param name="width">宽度</param>
    /// <param name="height">高度</param>
    /// <param name="logoImgae">Logo图片(缩放到真实二维码区域尺寸的1/6)</param>
    /// <param name="keepWhiteBorderPixelVal">白边处理(负值表示不做处理,最大值不超过真实二维码区域的1/10)</param>
    /// <returns></returns>
    public byte[] Create(
        string text,
        SKEncodedImageFormat format = SKEncodedImageFormat.Png,
        int width = 320,
        int height = 320,
        byte[] logoImgae = null,
        int keepWhiteBorderPixelVal = -1

解析二维码

根据本地文件解析
    /// <summary>
    /// 解析二维码
    /// </summary>
    /// <param name="qrCodeFilePath">二维码文件路径</param>
    /// <returns></returns>
    /// <exception cref="Exception"></exception>
    public string Decoder(string qrCodeFilePath)
根据文件流解析
    /// <summary>
    /// 解析二维码
    /// </summary>
    /// <param name="qrCodeStream"></param>
    /// <returns></returns>
    /// <exception cref="Exception"></exception>
    public string Decoder(System.IO.Stream qrCodeStream)
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 was computed.  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 netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen 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

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.0.3 392 7/6/2022
1.0.2 384 3/19/2022
1.0.1 122 3/4/2022