Imagemagick help..

Discussion in 'Programming' started by Jen2swt, Aug 17, 2009.

  1. #1
    I am trying to write a script that users can upload text and it spits it out in an image...

    I got it to work, but it will only allow one words. If I try more then 1 word it gives me a broken image, like the space is interferring somehow...

    BUT, it does work if I take that input text and add it to an exsisting image. Just not the image itself....

    Does anyone have any clue what the deal is or what I could be missing?

    Here is my convert line..

    convert -size 1400x120 xc:transparent -font peahannahrockyroad.ttf -pointsize 40 -fill DeepSkyBlue -annotate +20+60 '$name' -trim +repage final.png $finalimage

    NOTE: I use that exact same convert line in another script I made,but it takes the $name and it overlays it onto an existing image allowing me to use multiple words....
     
    Jen2swt, Aug 17, 2009 IP
  2. Vooler

    Vooler Well-Known Member

    Messages:
    1,146
    Likes Received:
    64
    Best Answers:
    4
    Trophy Points:
    150
    #2
    May be put the variable name within double quotes e.g. "$name" if it is more than one word.

    I didn't try Imagick yet but almost all console applications I tried before such as ffmpeg and flvtool accept arguments within "..." if they have space between.

    Form the command something linke this:

    $command = "convert -size 1400x120 xc:transparent -font peahannahrockyroad.ttf -pointsize 40 -fill DeepSkyBlue -annotate +20+60 \"$name\" -trim +repage final.png \"$finalimage\"";

    I hope it helps.

    regards
     
    Vooler, Aug 18, 2009 IP