in reply to Re: CGI parsing difficulty
in thread CGI parsing difficulty
This code has been altered a million times, so if you find some syntax error, it's probably something I haven't fixed from the last edit ;-)my $text = $query->param("text"); make_image($text); exit(0); ########################################################## # Make an image from the lines in the array # sub make_image { my $text = shift; my @lines = split(/\n/,$text); my $counter = 80; foreach my $line (@lines) { $im->stringTTF($black, "/home/httpd/html/ribbon.ttf", 15, 0, 5 +0, 80,$line); if ($@) { $im->string(gdSmallFont, 50, 150, "$@", $black); die "Cannot print!$!\n"; } $counter += 10; } binmode STDOUT; print $query->header(-type=>'image/png'); print $im->png; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: CGI parsing difficulty
by merlyn (Sage) on Nov 22, 2000 at 01:01 UTC | |
by tame1 (Pilgrim) on Nov 22, 2000 at 03:03 UTC | |
by tame1 (Pilgrim) on Nov 22, 2000 at 21:38 UTC |