What is the QR code?
Two-dimensional code from one-dimensional code extension, adding another dimension of readable barcode, with black and white rectangular graphic representation of binary data, the device is scanned after the information contained therein, two-dimensional code length, width are recorded data, QR code has a positioning point and fault-tolerant mechanism, even if not all the barcode identification, The barcode information can also be correctly restored according to the fault tolerance mechanism.
My blog QR code: The most common two-dimensional code
How to identify the direction of QR code? Can you identify your phone's horizontal and vertical rows?
In the case of QR code, there are three large positioning points that can be identified in any direction.
What information can the QR code record?
Network connection, text, picture.
What are the applications of QR codes?
, train tickets, ubiquitous merchant advertising links, etc.
QR Code supplemental knowledge, from Wikipedia
A friend scan with a QR code scanning device
Python has a very convenient two-dimensional code generation library: QRCode, can only generate two-dimensional code, can not decode.
ImportQRCode
qr = QRCode. QRCode (
Version=1,
Error_correction=qrcode. error_correct_l,
BOX_SIZE=10,
Border=4,
)
Qr.add_data (R'http://www.cnblogs.com/learn-my-life/')
Qr.make (Fit=true)
img = Qr.make_image ()
Img.save ('D:\\test.png')
Precautions
QRCode is a third-party library, and QRCode relies on the PIL library.
The build process is likely to be guessed from the function name.
"PYTHON" two-dimensional code generation