in reply to How to read JPEG and output to HTML
my $jpeg = getTheJpeg(); binmode STDOUT; print "Content-Type: image-jpeg\r\n", "Content-Length: ", length($jpeg), "\r\n\r\n", $jpeg;
The CGI is then pointed to by an IMG tag in your HTML.
update: shortened print command for clarity
|
|---|