belize has asked for the wisdom of the Perl Monks concerning the following question:
used as follows referencing an external CGI:print "Content-type: image/gif\n\n"; print $im->gif;
But if I use the image source as a sub-routine:<IMG SRC="image.cgi">
I get an ASCII printout on the page instead of the image.<IMG SRC="&image_routine">
So I would like to get the script to save the GD produced image as a file instead of outputting directly to the Webpage, but am having trouble getting it to work. I am using the following code:
The script runs fine, except the $image_test does not show.$gif_data = $im->gif; open (TEST,"$image_test") || die; binmode TEST; print TEST $gif_data; close TEST
Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to save an image (using GD) to a file
by clemburg (Curate) on Nov 27, 2000 at 21:23 UTC | |
by belize (Deacon) on Nov 28, 2000 at 00:13 UTC | |
|
Re: How to save an image (using GD) to a file
by KM (Priest) on Nov 27, 2000 at 21:24 UTC | |
|
Re: How to save an image (using GD) to a file
by arturo (Vicar) on Nov 27, 2000 at 21:03 UTC | |
by belize (Deacon) on Nov 28, 2000 at 00:10 UTC |