Skip to content
Advertisement

Draw circle with PIL (Old ones doesn’t works)

I am trying to draw a circle with PIL, but I get an attribute error.

Current code is for square.

Part of code to draw:

JavaScript

My whole code:

Code

Advertisement

Answer

You can use either ImageDraw.arc() or ImageDraw.ellipse.

JavaScript

a white circle on a black background

Or:

JavaScript

another white circle on a black background

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement