in reply to random ImageMagick questions
Sorry, Image::Magick hasn't what you are looking for; you can of course build your own system using QueryFontMetrics; here is an example of its usage:
#!/usr/bin/perl use Image::Magick; $i = Image::Magick->new; $i->Set( size => '320x200' ); $i->ReadImage('xc:white'); @params = ( font => '@arial.ttf', text => 'some text', pointsize => 36 ); ($w, $h, $ascend, $descend, $text_w, $text_h, $max) = $i->QueryFontMetrics( @params ); print "$w, $h, $ascend, $descend, $text_w, $text_h, $max\n"; $i->Annotate( @params, stroke => red, fill => red, gravity => center ); $i->Display;
HTH, Valerio
|
|---|