原图
ico.png
from PIL import Image
import os
filename = ''
iconame = os.path.join(filename, 'ico.png')
img = Image.open(iconame)
_width, _height = img.size
crop = (55, 0, _width, _height)
cropped = img.crop(crop) # (left, upper, right, lower)
cropped.save('new_ico.png')
结果
new_ico.png
网友评论