best way to assemble this information box

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
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

best way to assemble this information box

Post by myspacee »

hello to all,
I need to create some advice box in an www site.

Resorces are not mine, so www admin give me some limit. i can update only images on site.

Try to create (and update) some information box where i can write some info for site users, eg:

Image

I can valorize text variables, so which is the simplest way to 'build' image above?

thank you for any hints,

m.
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: best way to assemble this information box

Post by myspacee »

hello,
try to start from 'blank' sample :

Image

and run these :

Code: Select all

convert blank.png -font Arial -pointsize 14 -draw "gravity south fill black text 0,8 '30' " final.png
convert final.png -font Arial -pointsize 10 -draw "gravity south fill black text 0,30 'DEC' fill white text 0,29 'DEC' " final.png
first insert day, other insert month :

Image

how 'add bold' in this example (for day string) ?

Thank you,

m.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best way to assemble this information box

Post by fmw42 »

either use a bold font or add -stroke black -strokewidth X where X is 1 or 2, etc to make the stroke wider

see http://www.imagemagick.org/Usage/draw/#stroke
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: best way to assemble this information box

Post by Bonzo »

You should also be able to use -weight:
http://www.imagemagick.org/script/comma ... php#weight
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: best way to assemble this information box

Post by myspacee »

thanks both,
but i'm not able to add your hints to my syntax,
can you help me a bit more ?

m.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: best way to assemble this information box

Post by fmw42 »

try

convert blank.png -font Arial -pointsize 14 -fill black -stroke black -strokewidth 1 -gravity south -draw "text 0,8 '30' " final.png
myspacee
Posts: 153
Joined: 2007-06-14T02:09:35-07:00

Re: best way to assemble this information box

Post by myspacee »

thank you, works perfectly.
Post Reply