yun@dicom

导航

Python 实现 PNG 转 ICON, 各种大小随意定

1 from PIL import Image
2 
3 img = Image.open (r"D:\TMP15\EXAM256.png")
4 icon_sizes = [(16, 16), (32, 32), (48, 48), (64, 64), (128, 128), (256, 256)]
5 img.save (r"D:\TMP15\EXAM.ico", sizes=icon_sizes)

 

posted on 2023-08-01 10:55  yun@dicom  阅读(286)  评论(0编辑  收藏  举报