1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use strict; use warnings; use Image::Magick; my $image = Image::Magick->new ( size=>'200x200', background=>'white' ); my $text = 'Blahh!'; # TrueType font im Verzeichnis des Programms $image->Annotate(font=>'arial.ttf', pointsize=>10, fill=>'black', text=>$text); binmode STDOUT; $image->Write('test.png');
1 2 3 4 5 6 7 8 9 10 11 12
use strict; use warnings; use Image::Magick; my $image = Image::Magick->new ( size=>'200x200' ); $image->ReadImage('xc:white'); my $text = 'Blahh!'; # TrueType font im Verzeichnis des Programms $image->Annotate(font=>'arial.ttf', pointsize=>10, fill=>'black', text=>$text); $image->Write('test.png');