How to use python to make a QR code with background-both (dynamic and static)

from MyQR import myqr
import os


def gen_qr():
    myqr.run(
        words=input('enter message:'),
        picture=input('enter picture name:'),
        save_dir=os.getcwd(),
        save_name='qr.gif',
        colorized=True
    )


gen_qr()

After clicking Run, the operation steps are:

1. The first line appears first: enter message:
enter the message link you want to display, and press enter

2. Then the second line appears: enter picture name:
input the name you want to be the background picture, and press enter

3. After running, qr.gif will appear in the file you are in

4. Press qr.gif and the following picture will appear, that is, run the picture above
Insert picture description here

The picture I put up is a dynamic picture, but the dynamic effect is not visible on the python interface, you can view it in the qr.gif file stored on this computer

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_51766972/article/details/109256815