use strict; use Image::Magick; my ($image, $x); $image = Image::Magick->new; $x = $image->Set(size=>'100x100'); warn "$x" if $x; $x = $image->ReadImage('xc:none'); warn "$x" if $x; $x = $image->Draw(primitive=>'rectangle', points=>'5,5,50,25', fill=>'white'); warn "$x" if $x; #$image->MatteFloodfill(x=>6, y=>6, matte => 90); <== gives 'Unrecognized option (matte)' error $x = $image->Annotate(font=>'/usr/share/fonts/bitstream/Vera.ttf', fill=>'#00FF00', pointsize=>12, x=>10, y=>20, text=>'Hi'); warn "$x" if $x; $x = $image->Write('x.png'); warn "$x" if $x; undef $image;