May 8, 2011, 4:44 AM
Post #2 of 3
The program is design to be a CGI. To see the output, store it in a file and open it with an image viewer. A web browser will do.
Re: [tedo59] where does the output go?
[In reply to]
Replace these lines:
print "Content-type: image/png\n\n";
my $file = "example.png";
open my $png_fh, '>:raw', $file or die "could not open $file: $!\n";
print $png_fh $myimage->png or die "could not print to $file: $!\n";
close $png_fh or die "could not close $file: $!\n";
The image is stored in example.png.
I love Perl; it's the only language where you can bless your thingy.
Perl documentation is available at perldoc.perl.org. The list of standard modules and pragmatics is available in perlmodlib.
Get Markup Help. Please note the markup tag of "code".