Fix mixed tabs/space error
This commit is contained in:
parent
e23ce9bfc2
commit
1a1ed5e7fc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue