Python, Draw a circle with PIL

后端 未结 4 1338
星月不相逢
星月不相逢 2021-02-12 16:12

I am looking for a command that will draw a circle on an existing image with PIL.

im = Image.open(path)

I want a function that will draw a colo

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-12 16:41

    image = Image.open("x.png")
    draw = ImageDraw.Draw(image)
    draw.ellipse((x-r, y-r, x+r, y+r), fill=(255,0,0,0))
    

    using this way i am unable to make it translucent, it is always opaque

提交回复
热议问题