The stupid question is the question not asked | |
PerlMonks |
Re: Incorporating On-The-Fly Graphics In CGI outputby benn (Vicar) |
on Mar 30, 2003 at 20:20 UTC ( [id://246772]=note: print w/replies, xml ) | Need Help?? |
You can't incorporate binary graphic data directly into a HTML web page, which is what your CGI object is producing. You'll need to incorporate an <img> tag which then requests the picture data. One way would be to write the image to a temporary file, then use this filename for your image tag. Another way would be to separate out the graph-plot into a separate script or a re-entry into the existing script, then call it from your image tag... <img src='graph.cgi?drawpic=1'> or something, printing the binary data directly with the correct MIME-type header. Hope this helps.
In Section
Seekers of Perl Wisdom
|
|