小编20p*_*res的帖子

使用PHP或Imagick获取图像ICC配置文件

我一直在努力解决这个问题并且惊讶于找不到任何文档!

我正在将图像上传到网站,并希望提取每个图像ICC配置文件的名称并在图像描述中使用它.到目前为止,标准PHP没有产生任何结果.我用Photoshop,Bridge和Exiftool检查了图像,每个人都识别出嵌入的配置文件.

<?php 
$info = exif_read_data($image);
echo 'ICC Profile: '.$info['ICC_Profile'].'<br>';
echo 'ICC Profile: '.$info['CurrentICCProfile'].'<br>';
echo 'ICC Profile: '.$info['ColorSpace'].'<br>';
?>
Run Code Online (Sandbox Code Playgroud)

Imagick产生了最好的结果:

$imagick = new Imagick();
$imagick->readImage($image);
print_r ($imagick->getImageProfiles("icc",true));
Run Code Online (Sandbox Code Playgroud)

生成实际提到配置文件但不是可用字符串的数组.任何帮助赞赏.

我正在使用这些版本:

PHP版本5.2.17 - imagick模块版本3.0.1 - ImageMagick版本6.7.6-8

print_r返回(对于'ProPhoto RGB'ICC配置文件):

数组([icc] => KCMSmntrRGBXYZ :acspMSFTKODAROMM + KODAcprtHdesc\wtpt rTRC gTRC bTRC rXYZgXYZbXYZ,dmnd @ndmdd mmod (textCopyright(c)Eastman Kodak Company,1999,all rights reserved.descProPhotoRGB ProPhotoRGBProPhotoRGBXYZ ,curv XYZ 4I XYZ" > XYZ -descKODAK KODAKKODAKdesc'Reference输出介质公制(ROMM)( 参考输出介质公制(ROMM) )'参考输出中度量(ROMM)mmod ; )

完整(来自Exiftool):

Profile CMM Type                : KCMS
Profile Version                 : 2.1.0
Profile Class …
Run Code Online (Sandbox Code Playgroud)

php image color-management imagick color-profile

7
推荐指数
1
解决办法
3558
查看次数

标签 统计

color-management ×1

color-profile ×1

image ×1

imagick ×1

php ×1