问题描述
我在这里发现了一个非常有用的帖子,关于在圆圈中裁剪图像。但是,当我尝试在PHP中使用exec执行imagemagick脚本时,我没有得到任何结果。我已经检查以确保目录具有正确的权限等。我缺少一步吗?
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 -drawcircle 100,100 100,1上传/new.png');
$run = exec('convert -size 200x200 xc:none -fill daisy.jpg -draw "circle 100,100 100,1" uploads/new.png');
编辑:已安装Imagemagick。
Imagemagick is installed.
推荐答案
$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);
它会说什么?
这篇关于如何在PHP中执行Imagemagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!