Created
September 15, 2020 06:22
-
-
Save wfng92/6dcb09608cca87a1f767b5da4b164bce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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