better control of qr genration
This commit is contained in:
14
wedding-invitation/qrGen.py
Executable file
14
wedding-invitation/qrGen.py
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import qrcode
|
||||
|
||||
qr = qrcode.QRCode(
|
||||
version=2,
|
||||
error_correction=qrcode.constants.ERROR_CORRECT_Q,
|
||||
box_size=5,
|
||||
border=1)
|
||||
|
||||
with open("qrEvent_vi.txt") as fp:
|
||||
qr.add_data(fp.read())
|
||||
qr.make(fit=True)
|
||||
img = qr.make_image(fill_color="orangered", back_color="white")
|
||||
img.save("qr.png")
|
||||
Reference in New Issue
Block a user