ImageMagick 识别 Mac 和 Linux 之间的不同颜色空间

ImageMagick identifies a different colorspace between Mac and Linux

我有一张 JPEG 图片。

在我的 Mac 上,当我键入:

identify -verbose img.jpg

我得到 Colorspace: sRGB

在我的 Linux 框中,当我输入相同的内容时,我得到 Colorspace: RGB

为什么?有人遇到过这个吗?


这很重要的原因:

当我在 Mac 和 Linux 之间使用 convert img.jpg -colorspace sRGB out.jpg 时,我得到了截然不同的结果。显然,如果他们以不同方式识别源色彩空间,那么我就能明白为什么了。

确保两个系统都是运行最新版本。请参阅有关颜色管理的发布公告。

Color management has changed significantly between ImageMagick version 6.7.5-5 and 6.8.0-3 in order to better conform to color and grayscale standards.

简而言之

ImageMagick supports color profiles, however, for images without a profile or a declaration of colorspace, ImageMagick assumes non-linear sRGB. Most image processing algorithms assume a linear colorspace, therefore it might be prudent to convert to linear color or remove the gamma function before certain image processing algorithms are applied.