ImageColor defaults to alpha = 255 in only rgb specified for RGBA mode

This commit is contained in:
paddywwoof 2013-09-19 15:30:08 +01:00
parent 9bb76ea8e4
commit 25b39de5b7

View File

@ -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":