-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed as not planned
Description
Hi,
I'm currently trying to migrate py2 to py3, from Pillow 6.2.1 to 9.3.0
I'm noticing some strange behaviors in the draw polygon functions, where my inputs are the same, but the outputs are slightly different.
Heres a test case below, to run on py2.7 remove the width arg.
from PIL import Image, ImageDraw
import numpy as np
def pil_test():
poly = [(402, 52),(402, 52),(406, 54),(405, 55)]
img = Image.new('I', (500, 500))
draw = ImageDraw.Draw(img, mode='I')
draw.polygon(poly, fill=100, width=0)
## py2 - draw.polygon(poly, fill=100)
iarr = np.array(img)
print(iarr[52,403])
Pillow 6.2.1 output >> 0
Pillow 9.3.0 output >> 100
I would like to know if theres a workaround for this? or why is this happening?
Metadata
Metadata
Assignees
Labels
No labels