Thread PerlMagick Annotate-Problem (4 answers)
Opened by Froschpopo at 2007-05-12 17:56

frankes
 2007-05-13 13:09
#76664 #76664
User since
2005-04-02
140 Artikel
BenutzerIn

user image
Also bei mir funktioniert es auf diesem Weg ganz:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl
use Image::Magick;
use CGI qw(:all);
use CGI::Carp qw/fatalsToBrowser/;
use strict;

my $cgi =CGI->new();
my $image = Image::Magick->new();

open(IMAGE, 'elbu.jpg');
$image->Read(file=>\*IMAGE);
close(IMAGE);


$image->Thumbnail(geometry => 'geometry', width => 200, height => 200);

my ($height, $width) = $image->Get('height', 'width');
my $xy = $width.'x'.$height;

$image->Annotate(font =>'arial.ttf',
stroke => 'red',
fill => 'blue',
gravity => 'SouthWest',
geometry => $xy,
pointsize => 20,
text => 'Froschpopo',
);

print $cgi->header('image/jpeg');
binmode STDOUT;
print $image->Write('jpeg:-');


Wirf auch mal einen Blick da rein: ImageMagick.org

View full thread PerlMagick Annotate-Problem