Fix mixed tabs/space error
This commit is contained in:
parent
e23ce9bfc2
commit
1a1ed5e7fc
|
@ -112,13 +112,13 @@ class Escpos:
|
||||||
""" Open image file """
|
""" Open image file """
|
||||||
im_open = Image.open(path_img)
|
im_open = Image.open(path_img)
|
||||||
|
|
||||||
# Remove the alpha channel on transparent images
|
# Remove the alpha channel on transparent images
|
||||||
if im_open.mode == 'RGBA':
|
if im_open.mode == 'RGBA':
|
||||||
im_open.load()
|
im_open.load()
|
||||||
im = Image.new("RGB", im_open.size, (255, 255, 255))
|
im = Image.new("RGB", im_open.size, (255, 255, 255))
|
||||||
im.paste(im_open, mask=im_open.split()[3])
|
im.paste(im_open, mask=im_open.split()[3])
|
||||||
else:
|
else:
|
||||||
im = im_open.convert("RGB")
|
im = im_open.convert("RGB")
|
||||||
|
|
||||||
# Convert the RGB image in printable image
|
# Convert the RGB image in printable image
|
||||||
self._convert_image(im)
|
self._convert_image(im)
|
||||||
|
|
Loading…
Reference in New Issue