QR code generator
import pyqrcode
import png
from PIL import Image
s = "https://www.codesnail.com"
url = pyqrcode.create(s)
img = "codesnail-qr-code.png"
url.png(img, scale=10)
#opening image
im=Image.open(img)
im.show()
for installation guide: click me
QR code reader
from pyzbar.pyzbar import decode
from PIL import Image
d = decode(Image.open("codesnail-qr-code.png"))
# print(d)
print(d[0].data.decode())
for installation guide: click me
Happy coding :)
Top comments (0)