Page 1 of 1

convert is making animated gif

Posted: 2007-09-09T19:09:34-07:00
by parsnipnose3000
I am trying to make a gif with text using two fonts.

I cannot work out the syntax for this, and keep making an animated gif.

The code I am using is :

convert -background white -fill black -font arial-bold -size 500x35 -pointsize 24 label:"The Sunday Times" -font arial -pointsize 12 label:"19.08.07" -bordercolor white -crop 414x35+0+0 +repage "sundaytimes.gif"

Here is an example of what I want to achieve, and what I keep getting.

http://www.thefuturecanwait.com/image.htm

Re: convert is making animated gif

Posted: 2007-09-10T00:01:25-07:00
by Bonzo
Your problem may be the Label ?

I would use annotate or draw:

Code: Select all

convert -size 414x35 xc:white -fill black -font arial-bold -pointsize 24 -gravity west -annotate +0+0 \"The Sunday Times\" -font arial -pointsize 12 -gravity east -annotate +0+0 \"19.08.07\" sundaytimes.gif
I can not check this as am work.

I have changed -background to xc: and it worked OK

Re: convert is making animated gif

Posted: 2007-09-10T10:38:11-07:00
by parsnipnose3000
Many thanks for your help. I tried this code, and have added the output image to the page mentioned in my original post. It also gives me 2 errors, so maybe there is a syntax problem?

convert : unable to open image 'sunday' : no such file or directory
convert : unable to open image 'times' : invalid argument

Any ideas?

Re: convert is making animated gif

Posted: 2007-09-10T10:41:12-07:00
by el_supremo
The problem is that each label: creates an image. When you save these to a GIF you get an animation because there are two images.
You need to combine the two into one and then save them.

This command will do close to what you have in your example - note the spaces I've added in the strings.

Code: Select all

convert -background white -fill black -font arial-bold -pointsize 24 label:" The Sunday Times" -font arial label:" 19.08.07 " +append sundaytimes.gif
Pete

Re: convert is making animated gif

Posted: 2007-09-10T10:55:00-07:00
by Bonzo
How are you creating your image php ? I was not thinking when I posted and included the escape character \

It worked Ok for me but it looks like the " is the problem. Try replaceing the \" with '

If you have The_Sunday_Times it would probably be OK, for some reason the space character causes problems. That is why you need to put everything inside a " " or ' '