$path = getenv("PATH");
putenv("MAGICK_HOME=/Users/oa/Documents/software/ImageMagick-7.0.7");
putenv("DYLD_LIBRARY_PATH=/Users/oa/Documents/software/ImageMagick-7.0.7/lib");
putenv("PATH=/Users/oa/Documents/software/ImageMagick-7.0.7/bin:".$path);
$output = shell_exec("convert -page +0+0 src.jpeg foo.gif");
我明白了:
dyld:未加载库: /ImageMagick-7.0.7/lib/libMagickCore-7.Q16HDRI.4.dylib参考自:/Users/oa/Documents/software/ImageMagick-7.0.7/bin/convert
原因:未找到图像