python - Python3 PIL (Pillow) draw.pieslice bad arc -


i'm dawing simple pieslice pil

image = image.new("rgba", (256, 128), "#ddd") draw = imagedraw.draw(image, image.mode) draw.pieslice((0, 0 , 64, 64), 180, 270, fill="white)  del draw  image.save("file.png", "png") 

image

as can see arc not perfect. how can make perfect arc pil?

draw on larger image, downscale:

n=4 image = image.new("rgba", (256*n, 128*n), "#ddd") draw = imagedraw.draw(image, image.mode) draw.pieslice((0, 0 , 64*n, 64*n), 180, 270, fill="white") del draw image = image.resize((256,128)) # using user3479125's correction image.save("file2.png", "png") 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -