. NET generate QR code images

Source: Internet
Author: User

Must DLL Gma.QrCodeNet.Encoding.dll

        <summary>///Convert data to QR Code///</summary>//<param name= "Data" ></pa ram> private void Savecodefile (string data) {Qrencoder Qrencoder = new Qrencoder (errorcorrect            IonLevel.H);            QRCode code = new QRCode ();            Qrencoder.tryencode (data, out code);            const int modelsizeinpixels = 4; Draw the QR code graphicsrenderer render = new Graphicsrenderer (new Fixedmodulesize (Modelsizeinpixels, Quietzonemodules.            ), Brushes.black, brushes.white); Save path string filename = @ "C:\Users\Administrator\Desktop\QrCode.Net 0.4 pre-release/" + guid.newguid () + ". png"            ; Execute save picture using (FileStream stream = new FileStream (filename, filemode.create)) {rend Er. WriteToStream (code.            Matrix, System.Drawing.Imaging.ImageFormat.Png, stream); }//picturebox1 Display Picture this.pictureBox1.Image = IMage.               FromFile (filename); }

  

. NET generate QR code images

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.