其他分享
首页 > 其他分享> > ImageDraw绘制椭圆

ImageDraw绘制椭圆

作者:互联网

1 from PIL import Image,ImageDraw
2 img = Image.open(r'C:\Users\87823\Desktop\tree.png')
3 w,h = img.size
4 # 创建绘图对象
5 draw_obj = ImageDraw.Draw(img)
6 
7 draw_obj.arc((0,0,w-1,h-1),0,360,fill='blue')
8 img.show()

 

标签:draw,椭圆,obj,img,show,Image,ImageDraw,绘制
来源: https://www.cnblogs.com/monsterhy123/p/12918398.html