mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 10:46:16 +03:00
Update src/PIL/ImageDraw.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
e80002643d
commit
bd2977c518
|
@ -543,7 +543,7 @@ class ImageDraw:
|
|||
# font.getmask2(mode="RGBA") returns color in RGB bands and mask in A
|
||||
# extract mask and set text alpha
|
||||
color, mask = mask, mask.getband(3)
|
||||
ink_alpha = struct.pack("=i", ink)[3]
|
||||
ink_alpha = struct.pack("i", ink)[3]
|
||||
color.fillband(3, ink_alpha)
|
||||
x, y = coord
|
||||
self.im.paste(color, (x, y, x + mask.size[0], y + mask.size[1]), mask)
|
||||
|
|
Loading…
Reference in New Issue
Block a user