I have a cgi script-

#!C:/Perl/bin/perl -wT
use strict;
use CGI;
my $q = new CGI;
binmode STDOUT;
print $q->header(-type => "image/gif" );

use Image::Magick;

my $image=Image::Magick->new;
$image->Set(size=>'30x180');
$image->Read("gradient:#ff0000-#0000ff");
$image->Raise('3x3');
$image->Rotate(-90);
$image->Write( 'gif:-');

I run under WinNT, ActiveState perl, Apache. The script fails - malformed
header. It appears the  write
$image->Write('gif:-');
which is an ImageMagick method (here causing a print of the image to
STDOUT )
is happening Before the header prints (thus the malformed header!).
How can I correct this?
In a similar script if $picture holds an image a
print $picture;
does the job just fine.
TIA



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to