How to execute Imagemagick in PHP

自作多情 提交于 2019-12-23 15:53:40

问题


I found a very helpful post on here about cropping images in a circle. However, when I try to execute the imagemagick script using exec in PHP, I'm getting no results. I've checked to make sure the directories have the correct permissions and such. Is there a step I'm missing?

Any insight would be much appreciated. Here's what my script looks like:

$run = exec('convert -size 200x200 xc:none -fill daisy.jpg -draw "circle 100,100 100,1" uploads/new.png');

Edit: Imagemagick is installed.


回答1:


$out=array();
$err = 0;
$run = exec('convert -size 200x200 xc:none -fill daisy.jpg -draw "circle 100,100 100,1" uploads/new.png',$out,$err);
echo implode ("<br>",$out);
print_r($err);
print_r($run);

what would it say?



来源:https://stackoverflow.com/questions/2582658/how-to-execute-imagemagick-in-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!