import PythonMagick

img = PythonMagick.Image(\'image.png\')
img.sample(\'64x64\')
img.write(\'image_64x64.ico\')

img.sample(\'128x128\')
img.write(\'image_128x128.ico\')
#ps: download PythonMagick (Unofficial Windows Binaries for Python Extension Packages) 
或百度网盘 链接: https://pan.baidu.com/s/1E5qfG7PnRnHwp9h5orhsEg 提取码: 94gm
#ps: install PythonMagick (e.g. pip install C:\Users\Administrator\Desktop\PythonMagick-0.9.19-cp38-cp38-win_amd64.whl)

#ps: 图标下载地址easyicon

版权声明:本文为risunlee原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/risunlee/p/ico.html