我需要在png文件中更改图标颜色,其中图标具有透明背景 .

我使用了ImageMagick命令:

convert my_icon.png -fill #de2a2a" -colorize 100 output1.png

在Windows中,该命令为没有透明背景的图标着色 .

在Linux中,它会为“所有图标”着色,包括透明背景 .

为什么会这样?我怎样才能在Linux中解决这个问题?

ImageMagick版本:

  • Wibndows:ImageMagick 7.0.4-10 Q16 x64

  • Linux:ImageMagick 6.7.8-9 2016-06-16 Q16

图标:
enter image description here

谢谢