Recently found a relatively good C # QR code generation Class library on GitHub. Here to share with you.
GitHub Address: Https://github.com/codebude/QRCoder
Download the solution, compile and generate QRCoder.dll, and you can use it. This class library has fewer parameters to customize, and only supports two parameters (two-dimensional code text, error correction level). Where the picture size is not good control, you can generate a larger picture. Limit the size of the picture when it is displayed at the front desk. (QR code image is enlarged to reduce, generally does not affect the recognition degree.) )
1 usingQrcoder;2 3 namespaceQrcodesample4 {5 class Program6 {7 Static voidMain (string[] args)8 {9 varText ="http://www.baidu.com";Ten varQrimage ="qr.jpg"; One A varQrgenerator =Newqrcodegenerator (); -Qrcodegenerator.qrcode QRCode =Qrgenerator.createqrcode (text, qrcodegenerator.ecclevel.q); - the //You can modify this parameter to control the size of the picture. - varImage = Qrcode.getgraphic ( -); - image. Save (qrimage); - } + } -}
If you have a better class library, please do not hesitate to share.
Back-end generation QR code-C # generate QR code (QR)