将PNG转换为预乘alpha的方法 [英] Method for converting PNGs to premultiplied alpha

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

问题描述

寻找 Windows 的某种简单工具或流程,让我将一个或多个标准PNG转换为预乘alpha。

Looking for some kind of simple tool or process for Windows that will let me convert one or more standard PNGs to premultiplied alpha.

命令行工具是理想的;我可以轻松访问PIL(Python成像库)和Imagemagick,但如果它让生活更轻松,我会安装另一个工具。

Command line tools are ideal; I have easy access to PIL (Python Imaging Library) and Imagemagick, but will install another tool if it makes life easier.

谢谢!

推荐答案

我刚刚在Python和C中发布了一些代码,可以满足您的需求。它位于github上: http://github.com/maxme/PNG-Alpha-Premultiplier

I just released a bit of code in Python and in C that does what you are looking for. It's on github: http://github.com/maxme/PNG-Alpha-Premultiplier

Python版本基于cssndrx响应。 C版基于libpng。

The Python version is based on the cssndrx response. C version is based on libpng.

这篇关于将PNG转换为预乘alpha的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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