Allso wenn jemand das braucht, hier ist kleine examle code
Es funzt so nun ganz easy.
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
#!/usr/bin/perl
use strict;
require GD;
my $image_width=69;
my $image_height=32;
my $image_ackground = 'image.jpg';
my $noise_pixels=100;
my $std_out_image = 1;
my $hosts = 'TEXT HERE';
&CreateImage;
exit;
sub CreateImage {
my $gd = new GD::Image($image_width,$image_height);
my $black = $gd->colorAllocate(0,0,0);
my $white = $gd->colorAllocate(255,255,255);
my $green = $gd->colorAllocate(0,255,0);
my $blue = $gd->colorAllocate(0,0,255);
my $grey = $gd->colorAllocate(192,192,192);
$gd->fill(1,1,$white);
$gd->rectangle(0,0,$image_width-1,$image_height-1,$black);
$gd->string(GD::Font->Small,2,10,$hosts, $black);
my $png = $gd->png();
my $wbmpdata = $gd->wbmp($png);
if (defined($std_out_image)) {
print "Content-type: image/vnd.wap.wbmp\n\n";
binmode STDOUT;
print $wbmpdata;
}
return;
}
\n\n
<!--EDIT|polkana|1125567280-->