Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试了使用 PIL 中列出的代码使所有白色像素透明,以将一些 .ico 文件转换为具有透明背景的 .png 图像。
它不适用于所有 .ico 图像,有时它只是输出黑色背景的图像。
示例 .ico 文件可以位于此处
我在你放在那里的所有图标上都试过那个脚本。它工作得很好。有时它代表黑色背景的透明度。确保背景完全透明。在 Photoshop 中打开它。 编辑:确保您的图标具有 Alpha 通道。