Hallo,
Es ist eine wBMP image, die soll beim WAP surfen angeziegt werden aber alle meine Versuche waren bis her fehlgeschlagen.
Allso ich mache es mit GD. Da sollen auch die Zahlen und Buchstaben sein(auf der Image).
So mache ich das:
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
use strict;
require GD;
require GD::Convert;
import GD::Convert;
my $image_width=69;
my $image_height=32;
my $image_ackground = 'image.jpg';
my $noise_pixels=100;
my $image_background = 'white';
my $std_out_image = 1;
my $font = '/usr/share/syscons/fonts/cp1251-8x14.fnt';
&CreateImage;
exit;
sub CreateImage {
#my $font = GD::Font->load($font) or die(); #Das gibt immer Fehler so wie Out of memory during "large" request for 2147487744 bytes, total sbrk() is 1073152 bytes
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($green,gdSmallFont,2,10,"Peachy Keen");
if (defined($std_out_image)) {
#print "Content-type: image/wbmp\n\n";
print "Content-type: image/vnd.wap.wbmp\n\n";
binmode STDOUT;
print $gd->png(); #so geht es super!
#print $gd->wbmp; #so geht aber nicht trotzdem ist in Manpages so ausgezeichnet. http://search.cpan.org/~srezic/GD-Convert-2.12/Convert.pm
} else {
print 'Type is TEXT';
}
return;
}
Gibt'es Idehe oder Anregungen?
Danke für jede Antwort
PS. Sorry, aber über wbmp habe ich amwenigstens nichts gefunden
http://board.perl-community.de/cgi-bin....7bce231
Gruß Alexander\n\n
<!--EDIT|polkana|1125559703-->