Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-01-17 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How did you see in the new year?










    Results (196 votes). Check out past polls.

    Notices?