From 1a1ed5e7fcc7610601bc77a6faef5c9ac1de21be Mon Sep 17 00:00:00 2001 From: Christoph Heuel Date: Thu, 27 Aug 2015 23:45:15 +0200 Subject: [PATCH] Fix mixed tabs/space error --- escpos/escpos.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 97326c3..d331b02 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -112,13 +112,13 @@ class Escpos: """ Open image file """ im_open = Image.open(path_img) - # Remove the alpha channel on transparent images - if im_open.mode == 'RGBA': - im_open.load() - im = Image.new("RGB", im_open.size, (255, 255, 255)) - im.paste(im_open, mask=im_open.split()[3]) - else: - im = im_open.convert("RGB") + # Remove the alpha channel on transparent images + if im_open.mode == 'RGBA': + im_open.load() + im = Image.new("RGB", im_open.size, (255, 255, 255)) + im.paste(im_open, mask=im_open.split()[3]) + else: + im = im_open.convert("RGB") # Convert the RGB image in printable image self._convert_image(im)