projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
93dc416
)
improve patch according to reviewer's suggestion
author
Thomas Rehn
<thomas.rehn@initos.com>
Wed, 19 Nov 2014 09:13:54 +0000
(10:13 +0100)
committer
Thomas Rehn
<thomas.rehn@initos.com>
Wed, 19 Nov 2014 09:13:54 +0000
(10:13 +0100)
addons/hw_escpos/escpos/escpos.py
patch
|
blob
|
history
diff --git
a/addons/hw_escpos/escpos/escpos.py
b/addons/hw_escpos/escpos/escpos.py
index
d35da17
..
bb60d63
100644
(file)
--- a/
addons/hw_escpos/escpos/escpos.py
+++ b/
addons/hw_escpos/escpos/escpos.py
@@
-439,11
+439,11
@@
class Escpos:
img_rgba = Image.open(f)
img = Image.new('RGB', img_rgba.size, (255,255,255))
channels = img_rgba.split()
- kwargs = {}
if len(channels) > 1:
# use alpha channel as mask
- kwargs['mask'] = img_rgba.split()[3]
- img.paste(img_rgba, **kwargs)
+ img.paste(img_rgba, mask=channels[3])
+ else:
+ img.paste(img_rgba)
print 'convert image'