Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import qrcode
from PIL import Image
qr = qrcode.QRCode(
version=1,
error_correction=qrcode.constants.ERROR_CORRECT_H,
box_size=10,
border=4,
)
qr.add_data("https://medium.com/@ngwaifoong92")
qr.make(fit=True)
img = qr.make_image(fill_color="black", back_color="white")
img.save("qrcode.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment