python-Pillow画边框 作者:马育民 • 2020-02-16 11:52 • 阅读:10111 ``` from PIL import Image, ImageDraw im=Image.open('C:\\1.jpg') draw = ImageDraw.Draw(im) draw.line([(10,10),(50,10),(50,50),(10,50),(10,10)],width=1,fill='red') im.save('C:\\1_1.jpg') ``` 执行结果如下: [![](https://www.malaoshi.top/upload/0/0/1EF4zdOEJXiS.jpg)](https://www.malaoshi.top/upload/0/0/1EF4zdOEJXiS.jpg) 感谢:https://blog.csdn.net/weixin_38740463/article/details/90720370 原文出处:http://malaoshi.top/show_1EF4zdOVdmgT.html