Hi,
I'd like to generate web-enabled reports (graphs, actually, using the Perl module GD::Graph) on data from a database using Apache/mod-perl/Embperl(1.3.4)/DBI/DBD-Oracle.
I can generate the image and "print" it to a file handle (in different formats, namely GIF, JPEG, PNG), which will allow me to save it to a temporary file and then "call" that file in the HTML code using the <img> tag. However, I'd rather not do that, because of all the complications of having to deal with temporary files, sessions, clean-up, etc.
Is there a way, using Embperl, to send the image back to the browser on-the-fly, that is, without having to save it on a file first? Something along the lines of (if you'd allow me to write such aberration):
<img src="[-" print OUT $gd->png -]>
I'm aware that the code above isn't HTML, but perhaps it served the purpose of clarifying what I want to do. Thanks in advance for your help,
---
Daniel Barbar