【发布时间】:2015-11-07 19:56:34
【问题描述】:
我有一些嵌入颜色配置文件的 tiff 图像(示例是 Canon EOS-1Ds flash)。
当我将它们转换为 jpeg (gm convert source.tif target.jpeg) 时,生成的 jpeg 颜色在浏览器(Chrome、Firefox,但不是 IE)中会失真,但在系统图像查看器中则不会。
如果我在 GIMP 图像编辑器中打开源代码,并将颜色配置文件更改为 sRGB,则上述转换命令中的图像会在浏览器中正确显示。
所以我有这个问题:
如何识别图像具有嵌入颜色的事实 使用 graphicsmagick 配置文件?
使用此命令似乎删除了配置文件:
mogrify +profile '*' -define jpeg:preserve-settings
这是gm identify -verbose source.tif的输出
Image: Di 2007-1337.tif
Format: TIFF (Tagged Image File Format)
Geometry: 4053x2257
Class: DirectClass
Type: true color
Depth: 8 bits-per-pixel component
Channel Depths:
Red: 8 bits
Green: 8 bits
Blue: 8 bits
Channel Statistics:
Red:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 135.75 (0.5324)
Standard Deviation: 72.49 (0.2843)
Green:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 129.79 (0.5090)
Standard Deviation: 72.87 (0.2858)
Blue:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 125.43 (0.4919)
Standard Deviation: 73.42 (0.2879)
Resolution: 400x400 pixels/inch
Filesize: 26.4M
Interlace: No
Orientation: Unknown
Background Color: white
Border Color: #DFDFDF
Matte Color: #BDBDBD
Compose: Over
Dispose: Undefined
Iterations: 0
Compression: No
Signature: bec78e9402b39f6f5539a640715270a651a39c2238846fa42f37c1c7d99af747
Profile-color: 219244 bytes
Profile-iptc: 4358 bytes
unknown:
Byline:
Rod
Source:
Rod
Created Date:
20061006
Created Time:
110014+0000
Originating Program:
Capture One PRO
Program Version:
3.7.1
unknown:
0x00000000: ffffff5c 2c3bff65 2dffff39 ffffff55 ff5bff27 ----\,;-e---9---U-[-
0x00000014: ffffffff ff7affff ffffff48 103a29ff ff17ff58 '-----z-----H-:)----
0x00000028: ff616363 3dffffff ffffffff ff777a63 6537ff19 X-acc=--------wzce7-
0x0000003c: ffffffff 3c57ffff ff3c6674 ffff5f67 ff71ffff -----<W---<
0x00000050: 74ffff5f 67ff71ff ff00 ft--_
Tainted: False
User Time: 0.030u
Elapsed Time: 0:01
Pixels Per Second: 290.8M
以下转换后的图像在 OS 图像查看器中也被破坏:
Format: TIFF (Tagged Image File Format)
Geometry: 4992x3328
Class: DirectClass
Type: true color
Depth: 8 bits-per-pixel component
Channel Depths:
Red: 8 bits
Green: 8 bits
Blue: 8 bits
Channel Statistics:
Red:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 213.55 (0.8374)
Standard Deviation: 57.03 (0.2237)
Green:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 40.76 (0.1598)
Standard Deviation: 92.06 (0.3610)
Blue:
Minimum: 0.00 (0.0000)
Maximum: 255.00 (1.0000)
Mean: 161.49 (0.6333)
Standard Deviation: 121.23 (0.4754)
Resolution: 300x300 pixels/inch
Filesize: 47.6M
Interlace: No
Orientation: TopLeft
Background Color: white
Border Color: #DFDFDF
Matte Color: #BDBDBD
Compose: Over
Dispose: Undefined
Iterations: 0
Compression: No
Artist: Gary
Timestamp: 2006:11:12 12:35:12
Make: Canon
Model: Canon EOS-1Ds Mark II
Software: Adobe Photoshop CS2 Macintosh
Signature: 1b26f2c2122ea6aa391a40c7eb885d0da120x8e9x5bd7ce0dc7cc9038ba99737
Profile-iptc: 12926 bytes
unknown:
Byline:
Gary Ombler
Originating Program:
Capture One PRO
Program Version:
3.7.3
unknown:
#Q�$�'���߸︥�[��Rҝ5��n�b����h�
Profile-XMP: 17293 bytes
Tainted: False
User Time: 0.140u
Elapsed Time: 0:01
Pixels Per Second: 45.3M
【问题讨论】:
-
“identify -verbose”输出中的“Profile-color: 219244 bytes”行告诉您文件具有颜色配置文件。它还有一个 IPTC 配置文件,但这与您的问题无关。
-
现在无法测试,但我认为正常工作的常规图像也有颜色配置文件,并且由于它只是字节,我无法知道配置文件是否需要删除..我'不过,我会尽快仔细检查。
-
所以找到了一个工作正常的图像,但在 Profile-color 下确实有一些数据,虽然少得多(3144 字节)..
-
发现另一个坏了,没有指定
Profile-color -
不完全确定您要做什么,但也许您可以使用
convert -strip删除您的个人资料...
标签: imagemagick imagemagick-convert graphicsmagick color-profile