Problem with Windows IIS and PerlMagick IM-6.3.0
Posted: 2006-10-23T13:47:03-07:00
I am having problems with the latest versions perlMagick running under Windows Server 2003, IIS, and ActiveState perl.
I have been using what has worked in the past, but am open to a "proper" way to write and image.
example code runs in command prompt under perl.exe and from browser request through IIS as type .pl mapped to perl.exe.
A problem occurs when run from a browser as type .plx mapped to perlis.dll
example runs as expected under IM 6.2.9.7 and earlier. I can not get any versions 6.2.9.8 or later to work with perlis.dll
I have been using what has worked in the past, but welcome any suggestion for a "proper" way to write and image.
result from Firefox and Opera browser when demo.plx:
Result from IE6 seems to have image data but headers not properly formated:
I have been using what has worked in the past, but am open to a "proper" way to write and image.
example code runs in command prompt under perl.exe and from browser request through IIS as type .pl mapped to perl.exe.
A problem occurs when run from a browser as type .plx mapped to perlis.dll
example runs as expected under IM 6.2.9.7 and earlier. I can not get any versions 6.2.9.8 or later to work with perlis.dll
I have been using what has worked in the past, but welcome any suggestion for a "proper" way to write and image.
Code: Select all
#!c:/perl/bin/perl.exe
use Image::Magick;
$image=Image::Magick->new;
$error=$image->Set(size=>'200x200');
die "$error" if "$error";
$error=$image->ReadImage('xc:white');
die "$error" if "$error";
$x=100; $y=100;
$r=50; $xr=$x+$r;
$error=$image->Draw(stroke=>'#004444', primitive=>'circle',
fill=>'skyblue',
points=>"$x,$y,$xr,$y",strokewidth=>8);
die "$error" if "$error";
$error=$image->Draw(stroke=>'red', primitive=>'rectangle',
points=>'20,20 100,100',strokewidth=>5);
die "$error" if "$error";
@blobs = $image->ImageToBlob(magick=>'png');
use CGI qw(:standard -nph);
print header('image/png');
print $blobs[0];
Code: Select all
Content-type: text/html
'D:\InetPub\WWWRoot\WIS\PerlSupport\demo.plx' script produced no output
Code: Select all
Content-type: image/png â°PNG IHDRÃÃÂX®ž.... lot of binary looking stuff.