Adjusted QR error correction

Maxed out the error correction on QR code generation for vastly improved recognition. The trade-off is that the amount of bytes that can be stored are reduced.
This commit is contained in:
Nathan Bookham 2014-08-16 14:28:20 +01:00
parent 5a99c73e7a
commit 6fdea1234d
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ class Escpos:
def qr(self, text): def qr(self, text):
""" Print QR Code for the provided string """ """ Print QR Code for the provided string """
qr_code = qrcode.QRCode(version=4, box_size=4, border=1) qr_code = qrcode.QRCode(version=4, box_size=4, border=1, error_correction=qrcode.constants.ERROR_CORRECT_H)
qr_code.add_data(text) qr_code.add_data(text)
qr_code.make(fit=True) qr_code.make(fit=True)
qr_img = qr_code.make_image() qr_img = qr_code.make_image()