Hi,
I need a bit help with text positioning in y-dimension. I read somewhere ImageMagick uses the baseline of the text for positioning text in that dimension, is that confirmed? I need to position some text centered to other graphic objects and tried it by gathering the data via QueryFontMetrics, but obviously there's no data in the output how the baseline is related to the image height or did I miss something?
Any helpful thoughts on this?
Thanks
Text Positioning
Re: Text Positioning
Ok, maybe the question was to specific. Can anyone tell me in the first place where the 'anchor' (as in the coordinates that are given to annotate) in relation to the text is exactly?
Second question is then how do you align text centered (between to lines for example) in the y-direction.
Second question is then how do you align text centered (between to lines for example) in the y-direction.
Re: Text Positioning
You can use -gravity Center -annotate +0+0 and modify the position with the +0+0
Or you can use -draw \"gravity center fill black text 0,0 and modify the position with the 0,0
Some examples here: http://www.rubblewebs.co.uk/imagemagick/text.php
Have you checked out Anthonys examples ?
http://www.imagemagick.org/Usage/
Or you can use -draw \"gravity center fill black text 0,0 and modify the position with the 0,0
Some examples here: http://www.rubblewebs.co.uk/imagemagick/text.php
Have you checked out Anthonys examples ?
http://www.imagemagick.org/Usage/