【发布时间】:2010-01-01 04:11:33
【问题描述】:
我尝试使用Using PIL to make all white pixels transparent 中列出的代码将一些 .ico 文件转换为具有透明背景的 .png 图像。
它不适用于所有 .ico 图像,有时它只是输出黑色背景的图像。
示例 .ico 文件可以位于 here
【问题讨论】:
标签: python image python-imaging-library transparent
我尝试使用Using PIL to make all white pixels transparent 中列出的代码将一些 .ico 文件转换为具有透明背景的 .png 图像。
它不适用于所有 .ico 图像,有时它只是输出黑色背景的图像。
示例 .ico 文件可以位于 here
【问题讨论】:
标签: python image python-imaging-library transparent
我在您放在那里的所有图标上都尝试了该脚本。它工作得很好。有时它代表黑色背景的透明度。确保背景完全透明。在 Photoshop 中打开它。 编辑:确保您的图标具有 Alpha 通道。
【讨论】: