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
convert is making animated gif
Re: convert is making animated gif
Your problem may be the Label ?
I would use annotate or draw:
I can not check this as am work.
I have changed -background to xc: and it worked OK
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 have changed -background to xc: and it worked OK
Re: convert is making animated gif
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?
convert : unable to open image 'sunday' : no such file or directory
convert : unable to open image 'times' : invalid argument
Any ideas?
-
- Posts: 1015
- Joined: 2005-03-21T21:16:57-07:00
Re: convert is making animated gif
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.
Pete
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
Re: convert is making animated gif
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 ' '
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 ' '