Hi everyone.
I am using IM ImageMagick-6.8.3-Q16 CLI via Macro Scheduler to create thousands of web buttons. The following code works perfectly, except I want to move the text 4 pixels to the right, so it isn't justified up against the left edge. How would I do this, please?
Without the Macro Scheduler code :
convert -background yellow -fill black -size 495x35 -pointsize 31 -gravity west -font Arial-Bold label:TEST 2013-test-yellow2.gif
With the Macro Scheduler code :
run program>"%IMexepath%\convert" -background yellow -fill black -size 495x35 -pointsize 31 -gravity west -font Arial-Bold label:TEST %IMdocpath%\2013-test-yellow2.gif
Many thanks in advance, and thank you for an amazing program!
ClumsyNinja
How to indent text?
-
- Posts: 5
- Joined: 2013-09-21T18:38:31-07:00
- Authentication code: 6789
How to indent text?
ImageMagick-6.8.3-Q16 automated with MJTnet Macro Scheduler v14.
Windows 8 64 bit. Sony Vaio laptop.
New to ImageMagic, but an old hat at Windows automation.
Windows 8 64 bit. Sony Vaio laptop.
New to ImageMagic, but an old hat at Windows automation.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to indent text?
There are many ways. One is:
One tip, if you don't care exactly how many pixels are used for padding, is to add a space in the label, eg:
Code: Select all
convert -background yellow -fill black -pointsize 31 -gravity west -font Arial-Bold label:TEST -extent 495x35-4+0 y.gif
Code: Select all
convert -background yellow -fill black -size 495x35 -pointsize 31 -gravity west -font Arial-Bold label:" TEST " 2013-test-yellow2.gif
snibgo's IM pages: im.snibgo.com
-
- Posts: 5
- Joined: 2013-09-21T18:38:31-07:00
- Authentication code: 6789
Re: How to indent text?
That's fantastic! Thank you very much. The first solution was perfect.
I ended up using -extent 495x35-3-1 and managed to place the text exactly where I needed it.
This is the final code, in case it helps anyone else.
With Macro Scheduler code (in case anyone else here uses it)
Without Macro Scheduler code
I ended up using -extent 495x35-3-1 and managed to place the text exactly where I needed it.
This is the final code, in case it helps anyone else.
With Macro Scheduler code (in case anyone else here uses it)
Code: Select all
run program>"%IMexepath%\convert" -background yellow -fill black -size 495x35 -pointsize 31 -gravity west -font Arial-Bold label:%artistname% -extent 495x35-3-1 %IMdocpath%\2012-biggs-collings-yellow2.gif
Code: Select all
convert -background yellow -fill black -size 495x35 -pointsize 31 -gravity west -font Arial-Bold label:TEST -extent 495x35-3-1 c:\TEST.gif
ImageMagick-6.8.3-Q16 automated with MJTnet Macro Scheduler v14.
Windows 8 64 bit. Sony Vaio laptop.
New to ImageMagic, but an old hat at Windows automation.
Windows 8 64 bit. Sony Vaio laptop.
New to ImageMagic, but an old hat at Windows automation.
Re: How to indent text?
Is there a way to use different pixel indents if I am using multiple sentences for my image?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to indent text?
Create each image separately with each line of text and indent as needed. Then append the images vertically (-append). You can add borders to each separate image before appending if you want spacing. See -border or -splice or -extent at http://www.imagemagick.org/Usage/crop/.
You can do this all in one command if you use parenthesis processing. See http://www.imagemagick.org/Usage/basics/#parenthesis
You can do this all in one command if you use parenthesis processing. See http://www.imagemagick.org/Usage/basics/#parenthesis
Re: How to indent text?
Thanks for the reply fmw42!