Commands not being run automatically

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
zombie_nation

Commands not being run automatically

Post 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?
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Commands not being run automatically

Post 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.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Commands not being run automatically

Post 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?
Post Reply