1 Installation Tools
2 Generate normal QR code
3 Two-dimensional code with pictures
4 animated GIF two-dimensional code
5 using in Python programs
First, installation
First run in the Python environment,
Open cmd into python27
Enter scripts
Then enter the command in scripts: Pip install MYQR
Two
Generate normal QR code
Once you have installed MYQR, you can use it on the command line. If I want to http://www.rablive.cn
generate a two-dimensional code for a string, you just need to enter the following command on the command line:
myqr http://www.rablive.cn
After running, MYQR will save the generated QR code under the current path with the name qrcode.png
Three, with the picture of the two-dimensional code
If you want to create an art QR code, you can use the-p parameter to specify the picture, and the two-dimensional code together with the picture
MYQR http://www.rablive.cn-p Rablive.png
Is
The result of the default build is black and white, and if you want to generate color, you can add the parameter-C.
myqr http://www.rablive.cn -p rablive.png -c -n rablive_qrcode_c.png
Four, dynamic gif two-dimensional code
If you want to generate a dynamic GIF QR code, the way with the above image of the two-dimensional code generation is no different, just convert the original png/.jpg picture into GIF.
Python generates dynamic personality QR code