如何用Python将.ICO转换为.PNG? [英] How to convert an .ICO to .PNG with Python?

查看:353
本文介绍了如何用Python将.ICO转换为.PNG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将一批.ICO图像转换为Python中的.PNG图像。我有很多图片要经过,所以我想找一个程序化的解决方案。我已经尝试过使用PIL,但我似乎无法正确显示图像和透明度。

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.

我更喜欢使用Python,但如果可以的话可以做另一种语言或库也有帮助。

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

推荐答案

如果它只是一个批处理作业,为什么不使用 imagemagick

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

这篇关于如何用Python将.ICO转换为.PNG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆