Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Incorporating On-The-Fly Graphics In CGI output

by benn (Vicar)
on Mar 30, 2003 at 20:20 UTC ( #246772=note: print w/replies, xml ) Need Help??

in reply to Incorporating On-The-Fly Graphics In CGI output

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://246772]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2018-07-18 05:21 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (383 votes). Check out past polls.