JupiterHost.Net wrote:
hello list :)
Anyone have any idea why the last line doesn't print anything?
I get no errors and have eval'ed it with no errors. I've also tried with
->png and ->jpeg also with the same results...
I think I'm doing it right according to
http://search.cpan.org/~lds/GD-2.19/GD.pm
All it outputs is the header:
$ ./gdtest.pl
Content-type: image/gif
$
Here's the code:
#!/usr/bin/perl
use strict;
use warnings;
use GD;
my $image = GD::Image->new(100,50);
my $white = $image->colorAllocate(255,255,255);
$image->transparent($white);
my $fontcolor = $image->colorAllocate(0,0,0);
my $font = GD::Font->Small();
print "Content-type: image/gif\n\n";
$image->string($font,2,10,'hello world',$fontcolor);
#$image->rotate90;
print $image->gif;
TIA!
make sure that GD and libgd were built with gif support.
you may also wish to use
binmode STDOUT;
before you print
--
Scott R. Godin
Laughing Dragon Services
www.webdragon.net
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>