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)
Date Thu, 10 Oct 2002 00:30:32 GMT

You should be able to do something like this. I haven't tested this
but I've done this before on code I no longer have access too.

In your page: <img src="me.html?your=params&go=here">

In me.html, have a block of Emberl like the following. The first [ will
have to be
the very first character. Otherwise, any whitespace inbetween will
become part of the image
which will corrupt it. 

$http_headers_out{'Content-Type'} = "image/gif";

$gifdata = .... ; # GD generated image

binmode OUT;
print OUT $gifdata;


> 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
> <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

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

View raw message