From 64e5ea515138019238889f131c8272981f224b4d Mon Sep 17 00:00:00 2001 From: Manuel F Martinez Date: Thu, 14 Mar 2013 01:34:48 -0700 Subject: [PATCH] Added fixed tabs --- escpos/escpos.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 984b367..4c6ac35 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -104,16 +104,18 @@ class Escpos: """ Open image file """ im_open = Image.open(path_img) im = im_open.convert("RGB") + # Convert the RGB image in printable image self._convert_image(im) def qr(self,text): """ Print QR Code for the provided string """ qr_code = qrcode.QRCode(version=4, box_size=4, border=1) - qr_code.add_data(text) - qr_code.make(fit=True) - qr_img = qr_code.make_image() + qr_code.add_data(text) + qr_code.make(fit=True) + qr_img = qr_code.make_image() im = qr_img._img.convert("RGB") + # Convert the RGB image in printable image self._convert_image(im)