更新时间:2023-12-05 17:33:22
要匹配除黑色之外的所有颜色,您可以使用 + opaque#000000
。
为了包括#000000左右的范围,你可以尝试不同的百分比 fuzz
运算符:
In order to include a little range around #000000 you can try different percentages with the fuzz
operator:
convert input.png -fill white -fuzz 10% +opaque "#000000" result.png
使用ImageMagick 6.6.0-1在Windows上