By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 832 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

exec w. imagemagick gives incomplete result

P: n/a
Hi. Trying to generate some images with imagemagick. The following
works on
the command line:

/usr/local/bin/convert xc:yellow -resize 100x15! -gravity "West" -draw
"text 0,0 'Path Two'"
/Users/morten/Sites/cebra/images/a1a2e65dce30f01861c60d0acb5287c7.jpg

But when running via PHP exec, the yellow box gets created alright,
but the text doesn't
show.

exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err);

Any suggestions?

Thanks.

Morten
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Morten wrote:
But when running via PHP exec, the yellow box gets created alright,
but the text doesn't show. exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err); Any suggestions?


Try echo instead of exec

echo $CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file;
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--
Jul 17 '05 #2

P: n/a
Pedro Graca <he****@hotpop.com> wrote in message news:<br************@ID-203069.news.uni-berlin.de>...
Morten wrote:
But when running via PHP exec, the yellow box gets created alright,
but the text doesn't show.

exec($CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file, $out, $err);

Any suggestions?


Try echo instead of exec

echo $CONVERT." -font helvetica xc:yellow -resize 100x15! -gravity
\"West\" -draw \"text 0,0 \'".$text."\'\" ".$file;


And pasting the result of echo into a term works. I've found that this is
highly likely to be due to imagemagick convert invokes another executable
which is in /usr/local/bin and this path is not part of the PATH visible
to PHP (according to phpinfo()). How do I add it?

Thanks,

Morten
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.