Adding padding to text

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
hknight
Posts: 32
Joined: 2007-08-02T10:16:15-07:00

Adding padding to text

Post by hknight »

Hello,

I would like to add 4px vertical padding and 8px horizontal padding to this:

Code: Select all

      convert -background lightblue -fill blue \
      -font Candice -pointsize 20 label:'Hello World' \
      label.gif
Thanks!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Adding padding to text

Post by anthony »

Easy...

Code: Select all

  convert -background lightblue -fill blue \
      -font Candice -pointsize 20 label:'Hello World' \
      -bordercolor lightblue -border 8x4  label.gif
See IM examples
http://www.imagemagick.org/Usage/crop/#border
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply