Hi folks!

I'm going nuts on this, I have never used text rendering with 
imagemagick before, and the usage tutorials didn't help me with this, 
either.

I have an icon with a static size of 16x16 pixels. Next to it should be 
a varying string, with a pointsize of 14. This string should be 
vertically centered.

I tried it with 2 steps, the first one rendering the text into a 
temporary image and trim it. The second step would be putting the icon 
and the temporary together.

But I guess there is a solution to do this in one step, and catch some 
glitches (in my solution the text isn't centered vertically).

convert -background transparent -fill "#7fa1cc" -font Arial -size 200x16 
-pointsize 14 caption:"Test String" -trim temp.png

convert -background transparent search.png -size 5x16 xc:none temp.png 
-gravity center +append search_text.png

As you can see some things are badly solved, like the 200x16 and 
trimming the image, or the 5x16 xc:none spacer. Haven't got a clue how 
to solve these the right way.

Any help would be appreciated!

Bye,
Stephan
_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to