![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/704a8a15b8e400208e28ea2b796ed07c.png)
![请添加图片描述](https://i-blog.csdnimg.cn/blog_migrate/6a3789b953dd44e242ef84ca2290bd1c.jpeg)
画框
from PIL import Image
from PIL import ImageDraw
x = 0
y = 94
width = 462
height = 287
a = Image.open("模型-沙发.jpg")
aa = ImageDraw.ImageDraw(a)
aa.rectangle((0, 94, 0+462, 94+287), outline='yellow', width=2)
aa.rectangle((352, 0, 352+655, 0+455), outline='yellow', width=2)
aa.rectangle((317, 250, 317+251, 250+174), outline='yellow', width=2)
aa.rectangle((459,555,459+121,555+200),outline ='yellow', width=2)
aa.rectangle((0, 634, 0+884, 634+196), outline='yellow', width=2)
aa.rectangle((695, 645, 695+275, 645+195), outline='yellow', width=2)
a
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/58966230886e4bf5ed53d7b5c0170941.png)
抠图
from PIL import Image
x = 0
y = 94
width = 462
height = 287
a = Image.open("模型-沙发.jpg")
box = (x, y, x+width, y+height)
b = a.crop(box)
b
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/bee7de11c4b74ba04ed1190e0de97a5b.png)