想要改进这个问题? Update the question所以它是on-topic堆栈溢出。
关闭 10 年前。
如何使用 sips
、imagemagic
或其他工具通过命令行将图像转换为黑白(灰度)?
最佳答案
如果你安装了 imagemagick
,
convert source.jpg -colorspace Gray destination.jpg (true grayscale only)
convert source.jpg -monochrome destination.jpg (true black and white)
convert source.jpg -separate destination.jpg (separate into gray channels)
如果您不在乎丢失原始文件:mogrify -colorspace Gray file
。
https://stackoverflow.com/questions/7708368/