通过php中的imagemagick通过exec读取icc-profile

时间:2013-11-22 12:14:04

标签: php imagemagick exec color-profile color-management

我正在尝试使用imagemagick 识别-format 来读取图像所具有的icc-profile。我在Windows服务器上使用php。

我使用以下命令:

identify -format "%[profile:icc]" image.jpg > file.txt

如果我在命令行中运行它,它会工作并将icc-profile名称保存到file.txt。

但是当我尝试用exec在php中做同样的事情时,我得到一个空文件:

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

我尝试了 -format 以及其他有效的属性,例如:

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

0 个答案:

没有答案