【发布时间】:2014-01-05 20:27:58
【问题描述】:
我有一个基本的 imagemagick 脚本,可以在 Windows 上正常工作,但是当我在 linux 服务器(共享/hostgator)上运行它时,会创建图像,但没有应用 shave 命令。我使用的代码在这里:
$exp=path/to/file.jpg
$size = getimagesize("$exp");
$diff=abs($crop_h-$size[1]);
$shave = round($diff/2,0,PHP_ROUND_HALF_DOWN);
exec("convert $exp -shave 0x".$shave." $exp ");
就是这样。适用于 localhost/windows 但不适用于 live/linux。生成图像(表明 IM 正在工作),但侧面没有被剃光。
有什么想法吗?
【问题讨论】:
标签: linux imagemagick localhost live imagemagick-convert