原图如下:
改变过后的图如下:
查阅API写法如下:
from PIL import Image from PIL import ImageDraw pilim = Image.open('1.jpg') draw = ImageDraw.Draw(pilim) draw.rectangle([0,0,500,500],fill=(255,255,255,255)) del draw pilim.save('2.jpg')
原图如下:
改变过后的图如下:
查阅API写法如下:
from PIL import Image from PIL import ImageDraw pilim = Image.open('1.jpg') draw = ImageDraw.Draw(pilim) draw.rectangle([0,0,500,500],fill=(255,255,255,255)) del draw pilim.save('2.jpg')