convert input.png -extent 100x100 -gravity center -background white output.png
Run Code Online (Sandbox Code Playgroud)
如果输入为50x50,则周围背景为白色.我可以以某种方式将其设置为透明而不将输入中的任何颜色声明为透明吗?
使用ImageMagick,我想找到任何白色的像素并使它们透明.我认为关键是-threshold,但我无法弄清楚如何使用-threshold将白色像素更改为透明.任何建议最受赞赏.
我想改变我的图片背景颜色,这是我的来源http://cdn.mayike.com/emotion/img/attached/1/image/dt/20170916/18/20170916180007_833.png.
如果我想将背景颜色更改为其他颜色,我该怎么办?
如果我想将背景颜色更改为透明,我该怎么办?
我尝试过使用convert aa.png -background '#0e0e0e' bb.png,但这不起作用.