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()
2023-11-10 21:16:52
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()