Leser: 1
5 Einträge, 1 Seite |
1
2
3
4
5
6
7
my $image = Image::Magick->new();
$image->Set(magick => 'JPEG', compression => 'JPEG', quality => $qual);
my $watermark = $image->Annotate(font => 'Geeric.ttf', x=>10, y=>-10, pointsize => 20, fill => 'white', text => 'Copyright by Froschpopo', density => 70);
$image->Thumbnail(geometry => 'geometry', width => 200, height => 200);
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:-');
5 Einträge, 1 Seite |