【问题标题】:php,unix command ,imagick help mephp,unix命令,imagick帮助我
【发布时间】:2010-05-20 04:49:09
【问题描述】:

此命令将文本“花”添加到图像中:

convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg

我正在使用 ImageMagick 2.2.0。我正在使用 PHP 从 PHP 运行它:

system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 'Flower' flower_annotate1.jpg');

但我没有得到结果

【问题讨论】:

标签: php unix command imagemagick


【解决方案1】:

转义参数中的单引号:

system('convert flower.jpg -font courier -fill white -pointsize 20 -annotate +50+50 \'Flower\' flower_annotate1.jpg');

或者只是用双引号括起来,这样你就不必转义它们。

【讨论】:

    猜你喜欢
    • 2011-02-21
    • 2011-11-18
    • 2015-11-04
    • 2011-02-19
    • 1970-01-01
    • 2011-06-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多