Problem with Windows IIS and PerlMagick IM-6.3.0

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
abjones
Posts: 33
Joined: 2004-03-26T12:21:59-07:00

Problem with Windows IIS and PerlMagick IM-6.3.0

Post by abjones »

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.

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];
result from Firefox and Opera browser when demo.plx:

Code: Select all

Content-type: text/html

'D:\InetPub\WWWRoot\WIS\PerlSupport\demo.plx' script produced no output
Result from IE6 seems to have image data but headers not properly formated:

Code: Select all

Content-type: image/png ‰PNG  IHDRÈÈ­X®ž.... lot of binary looking stuff.
Post Reply