How to convert an .ICO to .PNG with Python?

好久不见. 提交于 2019-12-22 08:19:53

问题


I'm trying to convert a batch of .ICO images over to .PNG images in Python. I have quite a few images to go through so I'd like to find a programmatic solution. I've tried using PIL but I can't seem to get the images and transparency to come out correctly.

I'd prefer to use Python but if it can't be done another language or library would also help.


回答1:


If it's just a batch job, why not just use imagemagick?




回答2:


See http://code.google.com/p/casadebender/wiki/Win32IconImagePlugin

It's a PIL plugin that makes it handle Windows icons properly.



来源:https://stackoverflow.com/questions/4631683/how-to-convert-an-ico-to-png-with-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!