如何将配置文件未知的CMYK tif转换为png(RBG)?

时间:2019-10-14 10:46:37

标签: image-processing imagemagick

我正在尝试将tiff CMYK图像转换为PNG,但无法找到ICC配置文件,这会导致转换后的PNG出现错误的颜色。

我尝试了以下方法来确定配置文件:

$ identify -format "%[profile:icc]" test.tif

没有结果。

而且,以下内容,没有可用的结果:

$ identify -verbose test.tiff |grep -i profile
    crs:CameraProfile: Adobe Standard
    crs:CameraProfileDigest: 3DA8CE4A626CE36A1D0C55BF157793C9
    crs:LensProfileEnable: 0
    crs:LensProfileSetup: LensDefaults
  Profiles:
    Profile-8bim: 8730 bytes
    Profile-tiff:37724: 3132408 bytes
    Profile-xmp: 30533 bytes

此后,我下载了Adobe的配置文件并尝试了每个配置文件,但没有一个可以使用。这是我尝试应用配置文件的方式:

convert -profile CMYKProfiles.icc -profile AppleRGB.icc -colorspace rgb test.tif test.png

那行得通,但前提是我知道个人资料并提供正确的个人资料。就我而言,这是行不通的。

图像刚刚破裂还是有保留其颜色的转换方法?

1 个答案:

答案 0 :(得分:0)

您的文件有4层或页面。您想要的那个似乎是第一层/页面。每个都是CMYK,没有颜色配置文件。如果没有配置文件,则每个显示设备可能会根据使用的默认配置文件(如果有)显示不同的图像。

但是使用Imagemagick时,我可以如下使用USWebCoatedSwop.icc和sRGB.icc配置文件。

convert -quiet test.tif[0] -profile /Users/fred/images/profiles/USWebCoatedSwop.icc -profile /Users/fred/images/profiles/sRGB.icc test.png


test.png