使用 python Pillow 从 PNG 或 JPG 创建的 ICO 无法在 Windows XP 上运行。ICO 在 Vista 和更高版本上运行良好。
我写了一个简单的代码来证明一个在 XP 上运行并用 PIL 保存的 ICO 在 XP 上破坏了它:
from PIL import Image
original = Image.open('favicon.ico') # you can try with whatever format
original.save('newfavicon.ico') # not recognized on XP
我正在使用 Python 2.7。
你知道 XP 上的 ICO 有什么特别之处吗?
你有其他我可以尝试的库的建议吗?