c# 二维码生成

 

dll下载:  https://pan.baidu.com/s/1MDQalDEoV4iDXRYsEzDXtw

 

c# 二维码生成

 

 

生成图片,此dll适合Framework版本较多

 

Imports ThoughtWorks.QRCode.Codec  

Dim qrCodeEncoder As QRCodeEncoder = New QRCodeEncoder() qrCodeEncoder.QRCodeScale = 8 ‘;//大小(值越大生成的二维码图片像素越高) qrCodeEncoder.QRCodeVersion = 0 ‘;//版本(注意:设置为0主要是防止编码的字符串太长时发生错 ‘;//指定utf-8编码, 支持中文 Dim img As Bitmap = qrCodeEncoder.Encode(PicCellDic(dd), Encoding.UTF8) img.Save(filePicPath, ImageFormat.Jpeg)

  

生成图片,此dll适合Framework版本较少

 
Imports QRCoder


‘Dim qrGenerator As QRCodeGenerator = New QRCoder.QRCodeGenerator ‘Dim qrCodeData As QRCodeData = qrGenerator.CreateQrCode(PicCellDic(dd), QRCodeGenerator.ECCLevel.Q) ‘Dim qrcode As QRCode = New QRCode(qrCodeData) ‘Dim qrCodeImage As Bitmap = qrcode.GetGraphic(15) ‘qrCodeImage.Save(filePicPath, ImageFormat.Jpeg)

  

 

c# 二维码生成

上一篇:Windows认证 | 网络认证


下一篇:C#中的循环:while do...while for