Skip to main content


Animate QR Code GIF with Python

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)



Comments



🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍🐍

Popular Posts

Python underline string, Python underline text, Underline python print

Python pip - Installing modules from IDLE (Pyton GUI) for python 3.7

Top 40 Python - String Processing in Python | Working with String in Python

Python Program - When was I born? / Date of Birth / MY BIRTHDAY (using Python3+)

Top 11 Essential Python Tips and Tricks





Subscribe to our Channel


Follow us on Facebook Page

Join our python facebook groups



Join us on Telegram