L
laszlo
A have the following html file:
<HTML><HEAD><TITLE=test</HEAD>
<BODY><CENTER>
<IMG SRC=http://localhost/cgi-bin/wpm/wimaker.pl/test.png>
</CENTER></BODY></HTML>
also the following perl file:
#!/usr/bin/perl
use CGI;
use CGI::Carp;
use Image::Magick;
my $image = Image::Magick->new(size=>'100x100');
$image->Read('xc:green');
$image->Write('test.png'); #testing reasons only
my $q = new CGI;
$| = 1;
print $q->header(-type=>"image/png",-expires=>"now",-status=>"200
Document follows");
$image->Write("png:-");
I get a broken image, and test.png file is not written. If I delete
$image->Write('test.png'); it will not change the result, I believe
the problem is wimaker.pl isn't called at all.
If I run wimaker.pl from command line test.png is created, it is
correct image and I got the following output:
Status: 200 Document follows
Expires: Wed, 02 Jun 2004 22:22:52 GMT
Date: Wed, 02 Jun 2004 22:22:52 GMT
Content-Type: image/png
‰PNG
followed with the binary data for the correct png file (the character
before PNG stands for 0x89)
I use WIN2000 IIS perl 5.8.0 ImageMagick 6.0.1
How can I make wimaker.pl to be called as image generator?
<HTML><HEAD><TITLE=test</HEAD>
<BODY><CENTER>
<IMG SRC=http://localhost/cgi-bin/wpm/wimaker.pl/test.png>
</CENTER></BODY></HTML>
also the following perl file:
#!/usr/bin/perl
use CGI;
use CGI::Carp;
use Image::Magick;
my $image = Image::Magick->new(size=>'100x100');
$image->Read('xc:green');
$image->Write('test.png'); #testing reasons only
my $q = new CGI;
$| = 1;
print $q->header(-type=>"image/png",-expires=>"now",-status=>"200
Document follows");
$image->Write("png:-");
I get a broken image, and test.png file is not written. If I delete
$image->Write('test.png'); it will not change the result, I believe
the problem is wimaker.pl isn't called at all.
If I run wimaker.pl from command line test.png is created, it is
correct image and I got the following output:
Status: 200 Document follows
Expires: Wed, 02 Jun 2004 22:22:52 GMT
Date: Wed, 02 Jun 2004 22:22:52 GMT
Content-Type: image/png
‰PNG
followed with the binary data for the correct png file (the character
before PNG stands for 0x89)
I use WIN2000 IIS perl 5.8.0 ImageMagick 6.0.1
How can I make wimaker.pl to be called as image generator?