#!/usr/bin/perl -w
use strict;
use Image::Magick;
my $text = 'test';
my $im = new Image::Magick;
$im->Read("meteo.jpg");
my $rv = $im->Annotate(
text => $text,
x => 10,
y => 10,
);
die("Unable to annotate image: $rv\n") if "$rv";
print "Content-type: image/jpeg\n\n";
binmode STDOUT;
print $im->Write('jpeg:-');
####
Unable to annotate image: Warning 315: no delegates configuration file found (delegates.mgk) [No such file or directory]
####
Unable to annotate image: Warning 315: Unable to read font (Arial.ttf) [No such file or directory]
####
#!/usr/bin/perl -w
use strict;
use Image::Magick;
my $text = 'test';
my $im = new Image::Magick;
$im->Read("meteo.jpg");
my $rv = $im->Annotate(
text => $text,
font => 'C:\\WINDOWS\\Fonts\\Arial.ttf',
x => 10,
y => 10,
);
die("Unable to annotate image: $rv\n") if "$rv";
print "Content-type: image/jpeg\n\n";
binmode STDOUT;
print $im->Write('jpeg:-');