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()
正是江南好风景
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()