Imagemagick: replace alpha pixel with color-shade pixel

◇◆丶佛笑我妖孽 提交于 2019-12-08 04:44:42

问题


In previous question I made false assumption that I need to remove pixels with alpha, but I actually need to use alpha percentage as shade of white.

Because just removing alpha-pixel changes lines. But as background is to be white.

Image btn_bg_common_press.9.png

becomes

I also looked at ImageMagick, replace semi-transparent white with opaque white and found that I can do with

convert icon.png -channel A -fx "(a>0.5) ? 1.0 : 0" output.png

Though that is still rough.

来源:https://stackoverflow.com/questions/28939645/imagemagick-replace-alpha-pixel-with-color-shade-pixel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!