Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用php中的imagemagick thru exec读取icc配置文件_Php_Imagemagick_Exec_Color Profile_Color Management - Fatal编程技术网

使用php中的imagemagick thru exec读取icc配置文件

使用php中的imagemagick thru exec读取icc配置文件,php,imagemagick,exec,color-profile,color-management,Php,Imagemagick,Exec,Color Profile,Color Management,我正在尝试使用imagemagick identify格式来读取图像的icc配置文件。我在Windows服务器上使用php 我使用以下命令: identify -format "%[profile:icc]" image.jpg > file.txt 如果我在命令行中运行它,它会工作并将icc配置文件名保存到file.txt中 但是,当我尝试在php中使用exec执行相同的操作时,我得到一个空文件: exec('identify -format "%[profile:icc]" imag

我正在尝试使用imagemagick identify格式来读取图像的icc配置文件。我在Windows服务器上使用php

我使用以下命令:

identify -format "%[profile:icc]" image.jpg > file.txt
如果我在命令行中运行它,它会工作并将icc配置文件名保存到file.txt中

但是,当我尝试在php中使用exec执行相同的操作时,我得到一个空文件:

exec('identify -format "%[profile:icc]" image.jpg > file.txt');
我尝试过使用其他属性设置格式,例如:

exec('identify -format "%[size]" image.jpg > file.txt');

你确定php调用了相同版本的ImageMagick吗?简介:icc从6.8.7.2开始才可用。这就成功了。在我更改路径后没有重新启动,谢谢!