This article mainly summarizes the information about the QR code generation method. For more information, see the rapid development of the network. At the same time, there are many simple QR codes. Please pick up your hand and design the QR code. Below I will share some excellent QR code designs.
QR code principles:
Two-dimensional Barcode/two-dimensional Barcode can be divided into stacked/row-layout two-dimensional barcode and matrix two-dimensional barcode. Stacked/row-lined two-dimensional bar codes are stacked by one-dimensional five-bar codes with multiple lines of short cut; matrix two-dimensional bar codes are composed of matrices, in the corresponding element position of the matrix, "point" indicates the binary "1", and "null" indicates the binary "0", "point" and "null" to form the code.
Recently, I am interested in the QR code. I have studied the term qrcode, which is highly fault-tolerant.
Data Representation
The dark color module indicates the binary "1", and the light color module indicates the binary "0 ".
Error correction capability
· L-level: about 7% of data code words can be corrected.
· M-level: 15% of data code words can be corrected
· Q level: About 25% of data code words can be corrected
· Level H: about 30% of data code words can be corrected
The above design perfectly utilizes the fault tolerance of qrcode. It is nice and creative !!
1. google Interface
The Code is as follows:
<? Php
$ UrlToEncode = "http://www.csd2n.net"; // URL of the QR code to be generated
GenerateQRfromGoogle ($ urlToEncode );
Function generateQRfromGoogle ($ chlorophyll, $ widhtHeight = '000000', $ EC_level = 'l', $ margin = '0 ')
{
$ Url = urlencode ($ url );
Echo ''; // The Google API. If the API fails, you can query the latest API on the Google website.
}
?>
2. Convert. js code to canvas (important)
Demo: http://hxend.com/jsqrcode/test/
The Code is as follows:
QR code generation
Image:Clear edge
Text:Http://www.btgoogle.com </textarea> </p>
Size:
| Effect: |
|
| Liquid |
Square |
Circle |
Foreground color:
Background color:
Outside-border color:
Inside-border color:
Generate
The above four methods are the simplest of the 3rd, and the second one is recommended by me, with a higher degree of freedom. Let's choose one based on your needs.