perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wim Kerkhoff" <>
Subject RE: Generating images on-the-fly (newbie question) / embperl object
Date Thu, 10 Oct 2002 05:47:23 GMT
> > 	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
> This is something that comes up rather frequently. For future 
> reference, doing a search of the embperl mail archives
> ( is usually useful.
> You can output a gif directly from embperl so:
> <img src="graph.html?args=go&here=">

Last week I tried a couple of ways of doing this under EmbperlObject.
That is, from somepage.html try to ignore the output of base.html and
set the headers and content manually, while still having access to
things bound to the request object $req.

Is that even possible? I ended up configuring a /cgi-bin and creating a script to dump out my binary data.


[- $req = shift; $req->{dbh} = DBI ...; -]


[- Execute ('*') -]


$req = shift;
$dbh = $req->{dbh};
$http_headers_out{'Content-Type'} = "image/gif";
print OUT $dbh->selectrow_array("select imageblob from images where

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message