premultiplied-alpha

Method for converting PNGs to premultiplied alpha [closed]

早过忘川 提交于 2019-11-30 14:11:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . Looking for some kind of simple tool or process for Windows that will let me convert one or more standard PNGs to premultiplied alpha. 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. Thanks! 回答1: I just

Method for converting PNGs to premultiplied alpha [closed]

泪湿孤枕 提交于 2019-11-30 09:36:27
Looking for some kind of simple tool or process for Windows that will let me convert one or more standard PNGs to premultiplied alpha. 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. Thanks! 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 The Python version is based on the cssndrx response. C version is based on libpng. A more complete version of the cssndrx answer, using slicing in numpy to