Getting Perlmagick to work in windows

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply

Getting Perlmagick to work in windows

Post by loris »

I'm trying to get Perlmagick to work here. I have used Perl before but don't have much experience fiddling with windows.
This machine is running Windows 2000 professional.

I initially made the mistake of installing the wrong version of activePerl (the AIX version :
This didn't interface with imagemagick at all so I eventually tried deleting the perl directory and installed
ActivePerl- .
Then I installed ImageMagick (ImageMagick-6.2.8-0-Q8-windows-dll.exe) with the Perlmagick option, and IIRC other options as the default.

The advice in another thread ( ... php?t=6854 ) suggests that this is appropriate.

Perl works, and can write to files. I've tested this.
ImageMagick works, in that it can convert and display the IM logo from a dos prompt.
Perlmagick seems to be detected, but I can't get an image to display. Here is the program I'm trying:

Code: Select all

#!/perl/bin/perl.exe -w

use Image::Magick;


$filename = "image.jpg";
open(IMAGE, ">$filename");
$image->Write(file=>\*IMAGE, filename=>$filename);

undef $image;
(Which is cobbled together from the PM installation examples)

What happens is that it runs OK up to the image saving line, then a "Program error" box pops up in windows. This contains a warning sign but no text.
(With the AIX install it didn't get past use Image::Magick;)

I don't know what this means - maybe the program above is at fault. I can't quite believe that the image doesn't have to be reformatted before saving, but can't find any information on that.
Maybe I'm missing libraries for the output code - I've also tried png and gif suffixes.
Perhaps the initial install and deletion of the AIX perl is interfering, what should I do to fix that up? Or perhaps I should have done something else?
So I don't really know where to look now. If only the error message said something to go on.

I am very grateful for your advice on this, as I am eager to get on and use it!

Post Reply