是否可以使用命令行工具将 tiff 图像转换为模式 1 位图像。我看到它可以用 gimp 完成,但我需要运行一个脚本,所以我更喜欢使用像 imagemagick 等包的解决方案
最佳答案
如果图像内容已经是黑白的,而你只需要转换,使用:
convert input.tif -depth 1 output.tif
如果您还需要对图像进行阈值处理,请使用类似的东西:
convert input.tif -separate -black-threshold 128 -depth 1 output.tif
关于image - 将 tiff 转换为模式 1 位图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33070780/