当我在PIL中画一条线时,它显示为错误的颜色。例如,如果我说红色显示为蓝色,则蓝色显示为红色。有什么原因吗?下面的代码
color = 'red'
draw = ImageDraw.Draw(image_pil)
for c in coords:
(left, right, top, bottom) = (c[1]-1, c[3]+1, c[0]-1, c[2]+1)
draw.line([(left, top),(left, bottom), (right, bottom),
(right, top), (left, top)], width=thickness, fill=color)
enter image description here ttps://i.stack.imgur.com/X3xlC.jpg