Two-dimensional code
Two-dimensional code (referred to as QR code) is a black-and-white graphic that is distributed on a plane (two-dimensional direction) with a specific geometric pattern.
First look at an effect
Scan with your phone to see what this code means:)
Generate the code for the above code:
1 Static voidgenerateimg ()2 {3Qrencoder Qrencoder =NewQrencoder (ErrorCorrectionLevel.H);4QRCode QRCode = Qrencoder.encode ("Http://www.cnblogs.com/Aphasia");5 6Graphicsrenderer renderer =NewGraphicsrenderer (NewFixedmodulesize (5, Quietzonemodules.two), Brushes.black, brushes.white);7 using(FileStream stream =NewFileStream (@"Z:\temp\Aphasia.png", FileMode.Create))8 {9 renderer. WriteToStream (Qrcode.matrix, Imageformat.png, stream);Ten } One}
View Code
It needs to be used here.
Gma.QrCodeNet.Encoding.dll
System.Drawing.dll
More examples of qrcodenet see: http://qrcodenet.codeplex.com/
Bar code
Bar code (here refers to Code39 code) is the width of a number of black bars and blanks, according to a certain coding rules, to express a set of information graphical identifiers.
First look at the effect
The code shown in this article is downloaded: Http://files.cnblogs.com/Aphasia/Codedemo.rar
Code Production-(QR code, barcode)