Page 1 of 1

Create titles with border

Posted: 2009-03-31T07:05:03-07:00
by MeDioN
Hi there.

I want to generate some titles with border with Imagemagick.
I only find "stroke" to do this, but it's rendering an internal border inside the text:

Code: Select all

convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 \
-draw "text 25,60 'Magick'" -channel RGBA -gaussian 0x6 -fill darkred  \
-draw "text 20,55 'Magick'" fuzzy-magick2.png
Image

The original is there.

Code: Select all

convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 -weight bold \
-draw "text 25,60 'Magick'" -channel RGBA -gaussian 0x6 -fill darkred -stroke magenta  \
-draw "text 20,55 'Magick'" fuzzy-magick.png
Image

Basically the border goes inside.
It's nice there, but when i want to do it on a smaller title, i have this:

Code: Select all

convert -size 320x85 xc:transparent -font "erasbd.ttf" -pointsize 20 \
 -fill yellow -stroke "#000000" \
-draw "text 0,18 'Compendium'" fuzzy-magick.png
Image

And that's not really nice (especially the "e").

So i was wondering if it's possible to do external borders, and if it is, how ?

Any help would be gladly welcomed, thank you.

Re: Create titles with border

Posted: 2009-03-31T11:19:16-07:00
by fmw42
MeDioN wrote:Hi there.

I want to generate some titles with border with Imagemagick.
I only find "stroke" to do this, but it's rendering an internal border inside the text:

Code: Select all

convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 \
-draw "text 25,60 'Magick'" -channel RGBA -gaussian 0x6 -fill darkred  \
-draw "text 20,55 'Magick'" fuzzy-magick2.png
Image

The original is there.

Code: Select all

convert -size 320x85 xc:transparent -font Bookman-DemiItalic -pointsize 72 -weight bold \
-draw "text 25,60 'Magick'" -channel RGBA -gaussian 0x6 -fill darkred -stroke magenta  \
-draw "text 20,55 'Magick'" fuzzy-magick.png
Image

Basically the border goes inside.
It's nice there, but when i want to do it on a smaller title, i have this:

Code: Select all

convert -size 320x85 xc:transparent -font "erasbd.ttf" -pointsize 20 \
 -fill yellow -stroke "#000000" \
-draw "text 0,18 'Compendium'" fuzzy-magick.png
Image

And that's not really nice (especially the "e").

So i was wondering if it's possible to do external borders, and if it is, how ?

Any help would be gladly welcomed, thank you.
Redraw your text a second time without the stroke over the first time with the stroke. See the example at http://www.imagemagick.org/Usage/draw/#stroke

Re: Create titles with border

Posted: 2009-03-31T12:05:46-07:00
by MeDioN
Just what i have been looking for all the day...
You really save me a lot of time. :)

Many (many many) thanks mate.