From 6fdea1234d21ba796e234a4961c7effed6bbe465 Mon Sep 17 00:00:00 2001 From: Nathan Bookham Date: Sat, 16 Aug 2014 14:28:20 +0100 Subject: [PATCH] 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. --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index d9a00f9..9f06bc8 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -145,7 +145,7 @@ class Escpos: def qr(self, text): """ 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.make(fit=True) qr_img = qr_code.make_image()