ImageMagick - How do I flatten white levels to pure white?

China☆狼群 提交于 2019-12-04 08:33:55

The commandline option you are looking for is

-white-threshold value{%}

So a command of

convert image.png \
  -white-threshold 90% \
  -transparent white \
   image-trans.png

Note: Order of the respective parameters is significant! (You want first to convert all the light-gray pixels to white, then all white pixels to transparent.)

Works for me with 'ImageMagick version 6.7.8-0 2012-07-12 Q16'...

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