受欢迎的博客标签

ZXing.NET

Published

ZXing.NET 是一个开源的、功能强大的二维码处理库,它能够对二维码进行解码(读取信息)和编码(生成二维码)。ZXing 是 "Zebra Crossing" 的缩写,是一个跨平台的、用于解码和生成条形码和二维码的库。

github:https://github.com/micjahn/ZXing.Net/

How to Use?

blog:https://www.cnblogs.com/daboluo/p/17843359.html

step 1.Create  ZXing.NET.ConsoleApp Project for test ZXing.NET

step 2.Nuget,Install ZXing.Net  , Version="0.16.9"

 <ItemGroup>
   <PackageReference Include="ZXing.Net" Version="0.16.9" />
 </ItemGroup>

step 3.Install ZXing.Net.Bindings.SkiaSharp Version="0.16.13"

<ItemGroup>
  <PackageReference Include="ZXing.Net" Version="0.16.9" />
  <PackageReference Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.13" />
</ItemGroup>

If you want to try the sample code above within a project which target .Net Standard or .Net 5.0 or higher then you have to add one of the additional nuget package for a specific image library: https://www.nuget.org/packages?q=ZXing.Bindings The main package of ZXing.Net for such platforms only contains the core classes which are not dependent on a specific assembly for image formats.

come from source:https://github.com/micjahn/ZXing.Net/   - Usage examples

step 4.Install ZXing.Net.Bindings.Windows.Compatibility 0.16.12 for using System.Drawing 

<ItemGroup>
  <PackageReference Include="ZXing.Net" Version="0.16.9" />
  <PackageReference Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.13" />
  <PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
</ItemGroup>