Thread Problem mit Perl Modul bei Image::Magick Installation (19 answers)
Opened by Nature at 2008-07-10 14:56

Nature
 2008-07-10 18:36
#112003 #112003
User since
2008-07-10
11 Artikel
BenutzerIn
[default_avatar]
Ja das ist von einem Hersteller. Es funktionierte auch auf einem anderen Server nur auf unserem nun nicht

Code (perl): (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
if(-e "protected/var_3.pl"    ) {require "protected/var_3.pl";$|=1;    } else {&fehler($msg="File protected/var_3.pl not found!");}
if(-e "protected/data/ranklist.lst") {require "protected/data/ranklist.lst";$|=1;}

&init_cgi;
sub init_cgi {
use CGI; 
   $req = new CGI;
   @daten=$req->param;
   for(@daten) {
   my $value = $req->param($_);
    $in{$_} = $value;
   }
}
if($in{'usr'} ne '') {
if($in{'btn'} eq '') {$nr=1;} else {$nr=$in{'btn'};}
if($in{'cat'} ne '') {if(-e "protected/data/$in{'cat'}\_ranklist.lst") {require "protected/data/$in{'cat'}\_ranklist.lst";$|=1;}}
$name    = $in{'usr'};

if($in{'cat'} eq '') {
$button  = $btn{$nr};
if($rank{$name} eq ''){$rank{$name} = $norangtxt{$nr};}
if($rank{$name} eq '0'){$rank{$name} = $norangtxt{$nr};}
}
if($in{'cat'} ne '') {
$nr      = $in{'cat'}."_".$nr;
$button  = $btn{$nr};
if($catrank{$name} eq ''){$catrank{$name} = $norangtxt{$nr};}
if($catrank{$name} eq '0'){$catrank{$name} = $norangtxt{$nr};}
$rank{$name}=$catrank{$name};
}
&print_button;
exit;
} else {&fehler($msg="unknown parameter!");}

sub print_button {
use Image::Magick;
$image=Image::Magick->new;

$image->Read($button);

$image->Quantize(
#colors=>256,
colorspace=>$colorspace{$nr},
dither=>True,
measure_error=>True,
global_colormap=>True
);

#$image->Set(
#antialias=>'True', 
#colorspace=>RGB, 
#compression=>None, 
#fill=>black, 
#magick=>PNG, 
#matte=>True,
#mattecolor=>black,
#quality=>PNG,
#type=>TrueColorMatte
#);

$antialias{$nr} = 'false' if $antialias{$nr} eq '';

$image->Annotate(
font                     => $font{$nr}, 
pointsize                => $fsize{$nr}, 
fill                     => $fcolor{$nr}, 
text                     => $rank{$name} , 
x                                => $coordx{$nr}, 
y                                => $coordy{$nr}, 
align                    => $balign{$nr},
antialias                => $antialias{$nr}
);

print "Content-type: image/gif\n\n";
$image->Write("$bformat{$nr}:-");
undef $image;
}










sub fehler {
print "Content-Type: text/html\n\n";
print $msg;
exit;
}

View full thread Problem mit Perl Modul bei Image::Magick Installation