| A. Sinan Unur 2004-05-20, 2:31 pm |
| google@webticker.com (Bike Rider) wrote in
news:870ce12a.0405200944.61b3668c@posting.google.com:
> Hey folks!
> I am having a problem with a perl script that is printing binary into
> the browser... Credit being due where credit is being due first...
> <PLUG ALT="suckup">
> I bought Martien Verbuggen's book "Graphics Programming with Perl" and
> it is GREAT! I know Martien is in here from time to time and first off
> MANY thanks for a great piece of work (Buy it now!)
> </PLUG>
>
> Here's the code in question....
>
> $im = Image::Magick->new();
> $im->Read($uploadedfile);
> binmode STDOUT;
> print $cgi->header('image/jpeg');
> $im->Write('jpg:-');
You should probably print the header _before_ switching STDOUT to
binmode.
--
A. Sinan Unur
1usa@llenroc.ude (reverse each component for email address)
|