convert.exe:"缺少图像文件名"错误

时间:2015-02-26 17:42:13

标签: python imagemagick alpha

我正在使用以下python命令调用ImageMagick的convert.exe:

os.system("convert -compress group4 %s -type bilevel -monochrome %s -alpha off" % (imagefilename,imagefilename.replace(ext1,ext2)))

在添加“-alpha off”之前没有错误,但输出图像显示为黑色和亮绿色而不是黑色和白色。添加后,输出图像会正确显示,但每次转换图像时都会输出错误:

  

.tifconvert.exe:缺少图片文件名`off'@   误差/ convert.c / ConvertImageCommand / 3065

有没有办法抑制此错误,因为它会减慢运行时间并在命令提示符窗口中弄乱?我尝试将-alpha off标记移动到文件名之前,但随后图像在图像查看器中再次显示为绿色。

0 个答案:

没有答案
相关问题