Code below is running normally:
from PIL import Image, ImageDraw
WHITE = (255, 255, 255)
BLUE = "#0000ff"
MyImage = Image.new('RGB', (600, 400), WHITE)
MyDraw = ImageDraw.Draw(MyImage)
line_points = [(100, 100), (150, 200), (300, 100), (500, 300)] # list of tuple
MyDraw.line(line_points, width=40, fill=BLUE, joint='curve')
MyImage.show()
But if I change
line_points = [(100, 100), (150, 200), (300, 100), (500, 300)] # list of tuple
into
line_points = [[100, 100], [150, 200], [300, 100], [500, 300]] # list of list
the code will raise exception because the points are represented by list.
Is it appropriate that draw.line support the list of list as arguments?
My pillow version is 5.4.1.
Code below is running normally:
But if I change
into
the code will raise exception because the points are represented by list.
Is it appropriate that
draw.linesupport the list of list as arguments?My pillow version is
5.4.1.