程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python produce their own exclusive qr code

編輯:Python

Python makes your own exclusive QR code

  • Normal QR Code
  • QR code with image
  • Animation QR code

First download and import, you can downloadpip insatll MyQR to download

from MyQR import myqr


First you can see several parameters of this function

  • words : QR code content, link or sentence.

  • version: The size of the QR code, the range is [1,40], the default is 6

  • Note: The larger the version, the more complex the QR code and the harder it is to identify. The following versions are 40 and 20 respectively

  • level: QR code error correction level, the range is {L.M.Q.H}, H is the highest default

  • picture: Custom QR code background image, the supported formats are .jpg, png, bmp and gif animations

  • colorized: The background color of the QR code, the default is F, which is black and white

  • contarst: contrast, the higher the value, the higher the contrast, the default is 1.0

  • brightness: brightness, default is 1.0

  • save_name:QR code name

  • save_dic: The image save address, the default is the program working path

Ordinary QR code

from MyQR import myqrmyqr.run(words="good morning",save_name="ldq1.png")

QR code with image

from MyQR import myqrmyqr.run(words="https://download.csdn.net/?spm=1001.2014.3001.6907",picture="kk.png",colorized=True,save_name="ldq3.png")

Animation QR code

from MyQR import myqrmyqr.run(words="good luck ",picture="123.gif",colorized=True,version=3,save_name="ldq6.gif")


I don't know if you can see this animation clearly, the computerThere is currently only one moving picture in it


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved