目录
download
myqr支持生成静态、动态二维码,它不是python的标准库,需要自行下载。
pip install myqr
# or
conda install myqr
static qrcode
from MyQR import myqr
myqr.run(words="https://www.bilibili.com/",version=6,picture="./img/2233.png",
colorized=True,save_name="bilibili.png",save_dir="./img/")
我们可以这样立即查看
import matplotlib.image as imgplt
import matplotlib.pyplot as plt
x = imgplt.imread("./img/bilibili.png")
plt.axis('off')
plt.imshow(x)
dynamic qrcode
方法和静态图片差不多
from MyQR import myqr
myqr.run(words="https://www.ustc.edu.cn/",version=6,picture="./img/三团.gif",
colorized=True,save_name="santuan.gif",save_dir="./img/")
标签:plt,img,bilibili,二维码,myqr,import,save,制作
From: https://www.cnblogs.com/coco02/p/16880368.html