Animate QR Code GIF with Python
I will show you have can convert any GIF image
Into an Animated QR Code GIF image using Python just like this
You can also check out the source https://giphy.com/gifs/8GvAxttts0TarMoHgA
Check out the video demonstrating the process
#python4fun #qrcode #python
#Filename:- gif_QRCode.py #Required #pip install MyQR from MyQR import myqr import os version, level, qr_name = myqr.run( # Add string or a URL (add http(s):// before it) words="<YOUR TEXT OR URL>", # Set the highest fault tolerance rate version=1, # Control the error correction level, # the range is L, M, Q, H, increasing from left to right level='H', # Combining QR code + Image #Add file name eg. your_image.gif picture="<YOUR IMAGE>.gif", # Color QR code colorized=True, # Set contrast of the image, # 1.0 - original picture / default, # small value - low contrast, # large value - high contrast. contrast=1.0, # Set brightness of the image, # adjustment values same as above brightness=1.0, # Save the file name, the format can be jpg, png, bmp, gif save_name="final.gif", #Control location save_dir=os.getcwd() )
Reading generated GIF QR Code with Python
#Filename:- Decoding - Reading QR Code.py
#Required
#pip install Pillow
#pip install pyzbar
from PIL import Image
from pyzbar.pyzbar import decode
# <QR Code Image> - image.jpg, image.png, image.gif
result = decode(Image.open('final.gif'))
print(result)
#Filename:- Decoding - Reading QR Code.py #Required #pip install Pillow #pip install pyzbar from PIL import Image from pyzbar.pyzbar import decode # <QR Code Image> - image.jpg, image.png, image.gif result = decode(Image.open('final.gif')) print(result)
Comments
Post a Comment