#!/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;