Generate a QR code at the backend.
I recently found a relatively good C # QR code generation class library on github. I would like to share with you here.
Github address: https://github.com/codebude/QRCoder
Download the solution and compile and generate QRCoder. dll. This class library has few custom parameters and only supports two parameters (QR code text and Error Correction level ). If the image size is not properly controlled, a larger image can be generated. You can set the size of the image to be displayed on the front-end. (The two-dimensional code image is zoomed in and out, which generally does not affect the recognition degree .)
1 using QRCoder; 2 3 namespace QRCodeSample 4 {5 class Program 6 {7 static void Main (string [] args) 8 {9 var text = "http://www.baidu.com "; 10 var qrImage = "qr.jpg"; 11 12 var qrGenerator = new QRCodeGenerator (); 13 QRCodeGenerator. QRCode qrCode = qrGenerator. createQrCode (text, QRCodeGenerator. ECCLevel. q); 14 15 // you can modify this parameter to control the image size. 16 var image = qrCode. GetGraphic (20); 17 image. Save (qrImage); 18} 19} 20}
If you have better class libraries, do not share them.