本文介绍了ImageMagick将色彩空间缩小为灰色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将RGB和CMYK TIFF图像转换为RGB JPEG使用
I convert RGB and CMYK TIFF images to RGB JPEGs using
convert a.tif -colorspace rgb a.jpg
如果TIFF图像仅包含灰色像素,则生成的JPEG的颜色空间为灰色,而不是RGB。
If the TIFF image contains only gray pixels, the colorspace of the resulting JPEG is gray, not RGB.
如何强制ImageMagick始终使用RGB?
How can I force ImageMagick to always use RGB?
推荐答案
试试这个:
convert a.tif -colorspace rgb -type truecolor a.jpg
但是,我要问:你究竟如何确定你的结论'结果JPEG的颜色空间是灰色的,而不是RGB'?!?
However, I have to ask: How exactly do you determine your verdict 'colorspace of resulting JPEG is gray, not RGB'?!?
ImageMagick工具识别
可以查看文件使用的颜色空间。如果您有转换
,那么您也将识别
:
The ImageMagick tool identify
can look at the colorspace used by files. If you have convert
, then you'll have identify
too:
identify -format "%[colorspace] <== %f\n" *.png *.jpeg *.pdf *.tif
示例输出:
sRGB <== fullsize-coalesce-originals.png
Gray <== tiffg4.tif
CMYK <== cmyk.pdf
CMYK <== photoshop.jpeg
这篇关于ImageMagick将色彩空间缩小为灰色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!