Advanced Artistic QR Code Making Tutorial

Recently, there have been a lot of QR code productions, and they are all paid. It is probably a good-looking QR code, which will jump to the URL after scanning. This article is implemented using Python, so how much money does it cost? Learn to sell it cheaper.
insert image description here

Advanced QR Code Creation

Environment installation

pip install amzqr

Ordinary QR code

Example:

amzqr https://chat.zhangsan.cloud/ -v 10 -l Q  -n chat.jpg

Parameter Description:

  1. -v controls the side length, the range is 1 to 40, the larger the number, the larger the side length;
  2. -l controls the error correction level, the range is L, M, Q, H, increasing from left to right.
  3. -n control filename

Art QR code

Examples are as follows:

amzqr https://chat.zhangsan.cloud/  -p img.png  -con 1.5 -bri 1.6  -n chatai.jpg
  1. The -p parameter is used to read the picture
  2. -con is used to adjust the contrast of the image, 1.0 means the original image, a smaller value means lower contrast, and a larger value means vice versa. The default is 1.0.
  3. The parameter -bri is used to adjust the brightness of the picture, and the other usage and values ​​are the same as -con.
  4. -n controls the output filename

dynamic

The sample code is as follows:

# 安装模块后  picture和save_name参数的格式必须要一致
from amzqr import amzqr
import os
version, level, qr_name = amzqr.run(
    words='https://chat.zhangsan.cloud/',
    version=1,
    level='H',
    picture='cute.gif',
    colorized=True,
    contrast=1.0,
    brightness=1.0,
    save_name='a.gif',
    save_dir=os.getcwd()
)

illustrate

It's a pity that the relevant QR code cannot be displayed, and it was judged by CSDN as a violation. Let's go find the material and test it yourself.

Guess you like

Origin blog.csdn.net/weixin_46211269/article/details/132382341