9.0.0ICO图标制作
from PIL import Image import os file_path='/Users/caojian/Desktop/头像.png' size=(64,64) im=Image.open('/Users/caojian/Desktop/头像.png').resize(size) im.save(f'{os.path.join(os.path.splitext(file_path)[0])}.ico')
备注:如果用到PythonMagic包,直接pip install PythonMagic的话不行,需要下载whl进行安装。