Page 1 of 1

Commands not being run automatically

Posted: 2008-04-28T08:10:42-07:00
by zombie_nation
Hi,

I have a script that builds up a series of commands and then runs the commands in PHP.

An output of commands is:

Code: Select all

convert -size 366x516 -density 150x150 -units pixelsperinch xc:"#ffffff" /home/MYSITE/public_html/images/cards/gallery_1/canvas.jpg

composite -gravity center /home/MYSITE/public_html/images/backgrounds/football_portrait.png /home/MYSITE/public_html/images/cards/gallery_1/canvas.jpg /home/MYSITE/public_html/images/cards/gallery_1/canvas.jpg

convert /home/MYSITE/public_html/images/cards/tmp/ironman74.jpg -resize 346x496 /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg

composite -gravity center /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg /home/MYSITE/public_html/images/cards/gallery_1/canvas.jpg /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg

convert -background "#0008" -gravity center -size 346x40 -font Arial-Regular -pointsize 25 -fill "white" caption:"Ironman" +size /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg +swap -gravity south -composite /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg

convert -background "#0008" -fill white -size 346x30 -font Arial-Regular -pointsize 25 -fill "white" caption:" Bobby McCallum" +size /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg +swap -gravity north -composite /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg

composite -gravity southeast /home/MYSITE/public_html/images/logo.png /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg

composite -watermark 60% -gravity center /home/MYSITE/public_html/images/wmark.png /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg /home/MYSITE/public_html/images/cards/gallery_1/watermarks/ironman74_mod.jpg

convert /home/MYSITE/public_html/images/cards/gallery_1/ironman74_mod.jpg -resize 75x75 /home/MYSITE/public_html/images/cards/gallery_1/thumbs/ironman74_mod.jpg

convert /home/MYSITE/public_html/images/backgrounds/football_back.png /home/MYSITE/public_html/images/cards/gallery_1/back_ironman74_mod.jpg

convert -gravity north -fill "white" -draw "rectangle 48,115 320,437" -size 260x285 -gravity north -font Arial-Regular -pointsize 25 -fill "black" caption:"'Testing'" /home/MYSITE/public_html/images/cards/gallery_1/back_ironman74_mod.jpg +swap -gravity center -composite /home/MYSITE/public_html/images/cards/gallery_1/back_ironman74_mod.jpg

convert /home/MYSITE/public_html/images/cards/gallery_1/back_ironman74_mod.jpg -resize 75x75 /home/MYSITE/public_html/images/cards/gallery_1/thumbs/back_ironman74_mod.jpg
This was working correctly until last week and then suddenly stopped.

When I use ssh to run these on the server it works. When I let it run automatically it does not find the font or for some other reason it does not run caption or annotation.

Could anyone shed some light?

Re: Commands not being run automatically

Posted: 2008-04-28T10:04:33-07:00
by Bonzo
Is it your server ? If not I would say the server has been upgraded in some way and the font is no longer available.
Try putting the font into a folder and give the code the path to the font.

You can use some of the code here to find your current settings: http://www.rubblewebs.co.uk/imagemagick ... server.php

Just on a side note: can you not use relative paths rather than absoulte ones ? this would make the code easer to read.
Also http://www.imagemagick.org/Usage/files/#mpr may simplify/speed up your code.

Re: Commands not being run automatically

Posted: 2008-04-28T10:35:23-07:00
by fmw42
I do not know if this relates or not, but +swap was broke in some early versions of 6.4.0 and fixed in 6.4.0-4. Do you get any error messages? What IM version are you using?