470,855 Members | 1,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

exec w. imagemagick gives incomplete result

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
2 3437
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
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.

Similar topics

5 posts views Thread by PeterF | last post: by
4 posts views Thread by Andrew Crowe | last post: by
1 post views Thread by Geoff Soper | last post: by
reply views Thread by Andrew Crowe | last post: by
3 posts views Thread by Joe | last post: by
4 posts views Thread by Andrew Crowe | last post: by
3 posts views Thread by ajh | last post: by
6 posts views Thread by Jeff | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.