mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-03 15:33:41 +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":
|
if mode == "RGB":
|
||||||
return color
|
return color
|
||||||
if mode == "RGBA":
|
if mode == "RGBA":
|
||||||
|
if len(color) == 3:
|
||||||
|
color = (color + (255,))
|
||||||
r, g, b, a = color
|
r, g, b, a = color
|
||||||
return r, g, b, a
|
return r, g, b, a
|
||||||
if Image.getmodebase(mode) == "L":
|
if Image.getmodebase(mode) == "L":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user