使用Exec通过ImageMagick转换图像

时间:2011-11-25 13:16:17

标签: php imagemagick

我正在尝试在mamp上使用php中的exec命令来使用imagemagick做一些事情。代码在命令行中运行良好:

convert "fullpathhere/pdfconverter/IM-wireframes.pdf" "fullpathhere/pdfconverter/converted/output.png"

这可以做它应该做的事情 - 将pdf转换为图像...所以我知道一切都安装正确...但是一旦我把它放到php:

exec('/Applications/MAMP/bin/ImageMagick-6.7.3/bin/convert "fullpathhere/pdfconverter/IM-wireframes.pdf" "fullpathhere/pdfconverter/converted/output.png"', $arr, $output);

它不起作用... $ output var返回127 ....我认为路径未找到...但路径是正确的,因为它在命令行上运行就好了。

任何想法为什么?

0 个答案:

没有答案