R
rbonin
The image magick method Write('gif:-') is supposed to write the binary
file to STDOUT. I tried adding "binmode STDOUT" before the
$image->Write command but that did not help. The STDOUT from
$image->Write('gif:-'); is not making it's way to the browser, the
browser is displaying a broken image. Looking at the raw response, I
see the correct header, just no data being sent.
Can I capture the STDOUT into a variable, and use a binary write to the
browser? I don't want to write the image to the hard drive.
<% @LANGUAGE="PerlScript" %>
<%
use Image::Magick;
my $image = Image::Magick->new;
$image->Read('W:\\in.gif');
$Response->{ContentType} = "image/GIF";
$image->Write('gif:-');
undef $image;
%>
Thanks
Robin
file to STDOUT. I tried adding "binmode STDOUT" before the
$image->Write command but that did not help. The STDOUT from
$image->Write('gif:-'); is not making it's way to the browser, the
browser is displaying a broken image. Looking at the raw response, I
see the correct header, just no data being sent.
Can I capture the STDOUT into a variable, and use a binary write to the
browser? I don't want to write the image to the hard drive.
<% @LANGUAGE="PerlScript" %>
<%
use Image::Magick;
my $image = Image::Magick->new;
$image->Read('W:\\in.gif');
$Response->{ContentType} = "image/GIF";
$image->Write('gif:-');
undef $image;
%>
Thanks
Robin