- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqrcodepy.py
More file actions
Latest commit
14 lines (10 loc) · 534 Bytes
/
Copy pathqrcodepy.py
File metadata and controls
14 lines (10 loc) · 534 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
importqrcode
fromqrcode.image.styledpilimportStyledPilImage
fromqrcode.image.styles.moduledrawersimportRoundedModuleDrawer
qr=qrcode.QRCode(error_correction=qrcode.constants.ERROR_CORRECT_L)
qr.add_data("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
img_1=qr.make_image(image_factory=StyledPilImage, module_drawer=RoundedModuleDrawer())
'''img_3 = qr.make_image(image_factory=StyledPilImage, embeded_image_path="/path/to/image.png")'''
img_1.save("qr.png")
'''img = qrcode.make("www.google.com")
img.save("qr1.png")'''