mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
ImageColor defaults to alpha = 255 in only rgb specified for RGBA mode
This commit is contained in:
parent
9bb76ea8e4
commit
25b39de5b7
|
@ -102,6 +102,8 @@ def getcolor(color, mode):
|
|||
if mode == "RGB":
|
||||
return color
|
||||
if mode == "RGBA":
|
||||
if len(color) == 3:
|
||||
color = (color + (255,))
|
||||
r, g, b, a = color
|
||||
return r, g, b, a
|
||||
if Image.getmodebase(mode) == "L":
|
||||
|
|
Loading…
Reference in New Issue
Block a user