4 Einträge, 1 Seite |
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
#!/usr/bin/perl use GD; my $im = new GD::Image(100,50); # allocate some colors $white = $im->colorAllocate(255,255,255); $black = $im->colorAllocate(0,0,0); $red = $im->colorAllocate(255,0,0); $blue = $im->colorAllocate(0,0,255); # And fill it with red $im->fill(1,1,$red); my $fontsize = 20; # 20px Font my $x = 0; my $y = $fontsize; $im->stringFT($black,'C:/WIN/FONTS/ARIAL.TTF',$fontsize, 0, $x, $y, "Hallo"); print "Content-Type: image/png "; binmode STDOUT; # Convert the image to PNG and print it on standard output print $im->png;
4 Einträge, 1 Seite |