我写了一个应用程序,通过ImageMagick裁剪和调整一堆图像。这些图像也被转换为灰度。但是,当我尝试在Photoshop CC中打开已转换的图像时,会出现以下警告:
无法使用嵌入的ICC配置文件,因为ICC配置文件无效,忽略该配置文件。
此外,图片颜色空间是灰度的,但我希望它是RGB。如何使用ImageMagick实现这一点?我尝试了不同的参数,但没有一个适合我。
当前正在使用的命令是:
convert ${src} -type grayscale -set colorspace RGB -background white -gravity center -extent ${longest}x${longest} ${dest}
此外,这一个也没用:
convert.exe ${src} -set colorspace RGB -set profile RGB.icc ${dest}
-strip
命令很好地移除了无效的配置文件。 - Andreas Remdt