I am trying to get an application called "Image Display System" (IDS)
v0.82 working. But it doesn't work, and even more basic than that, I
can't seem to get a simple Perl script to successfully invoke
ImageMagic. I know someone has to have solved this problem before!
Here is my test Perl script:
use Image::Magick;
print "Content-type: image/gif\r\n\r\n";
$image=Image::Magick->new;
$image->Set(size=>'30x180');
$image->Read("gradient:#ff0000-#0000ff");
$image->Raise('3x3');
$image->Rotate(-90);
binmode STDOUT;
$image->Write('gif:-');
Here is the client-side error I get when I hit the test page, named
"Test-PerMagick.pl":
CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers. The headers it did return are:
Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module
Image::Magick: load_file:The specified module could not be found at
C:/Perl/lib/DynaLoader.pm line 229.
at D:\Data\Public\James Rother Collier\Photo\IDS\Test-PerMagick.pl
line 9
Compilation failed in require at D:\Data\Public\James Rother
Collier\Photo\IDS\Test-PerMagick.pl line 9.
BEGIN failed--compilation aborted at D:\Data\Public\James Rother
Collier\Photo\IDS\Test-PerMagick.pl line 9.
[NOTE: "line 9" is the first line in the script above, "use
Image::Magick"]
IIS, my virtual directory, and Perl seem to be configured correctly,
because a test CGI script in the same directory as the above script
works succesfully:
#!/bin/perl
print ("Content-type:text/html\r\n\r\n");
print ("<html><body><h1>Hello World!</h2></body></html>");
Here are my application versions:
Windows 2000 Server SP3
IIS 5.0
ActiveState ActivePerl 5.8.0.806
ImageMagick 5.5.7 q16 (Windows dynamic)
In the ImageMagick setup, I elected to "Install PerlMagick for
ActiveState Perl v5.8.0 build 804".
The stock .pl script tests in the "C:\Program
Files\ImageMagick-5.5.7-Q16\PerlMagick\demo" directory run
successfully (although at first I was getting a "missing msvcr71.dll"
error from Windows until I got ahold of that DLL and put it in
System32).
Prior to this, I had an earlier version of Perl installed (ActiveState
ActivePerl 5.6.1.633), and the whole point of this exercise--getting
IDS running, worked better. At least the website worked as it was
supposed to, except for not showing any images (e.g. ImageMagic was
apparently not working then either). But now I immediately get CGI
errors as above. The reason I upgraded Perl was because the
PerlMagick election, which I mentioned above, seemed to suggest I
needed 5.8.0. (To upgrade, I uninstalled ImageMagick, then the old
version of Perl, then installed the new version, re-installed
ImageMagick, and checked that the path setting was still good.)
If it's as simple as installing the correct versions of Perl and
ImageMagick that are known to work together, then please include links
to binary downloads. (Note: IDS requires ActiveState ActivePerl
5.6.1.626 or later.) If it's a configuration issue with ImageMagick,
please advise how you solved the problem.
Thanks!
Jim |