in reply to GD graphs and CGI
If you want to send your image directly to the browser, then you'll need to send it to STDOUT with a proper content-type header:
print "Content-type: image/png\n\n"; print $gd->png;
If you want to save the image on your server and tell the browser to display it, then use:
open IMG, '>file.png'; print IMG $gd->png; close IMG; print "Content-type: text/html\n\n"; print '<img src="http://yourserver.com/file.png">';
UpdateFixed typo in content-type.
|
|---|