Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Image::Magick on Windows!

by jeffpflueger (Beadle)
on Nov 27, 2003 at 17:56 UTC ( #310568=perlquestion: print w/ replies, xml ) Need Help??
jeffpflueger has asked for the wisdom of the Perl Monks concerning the following question:

I've put aside trying to make my FreeBSD machine act like a Windows machine. Now, I'm trying to make my windows 2000 machine act like my FreeBSD machine. ImageMagick can be installed on windows! And I've got Active State Perl running there too, along with Ghostscript. I am almost there to begin using the whole lot to rip through tons of images and crop them...but I need to get the Image::Magick module installed.... The PPM repository doesn't seem to have the packages I need, and so far my manual attempts have been unsuccessful (with nmake.exe). I tried the CPAN module and didn't have much luck there either. Anybody have any suggestions about how I might accomplish this?
"No matter where you go, there you are." Jeff Pflueger - Struggling Perl knowledge sponge

Comment on Image::Magick on Windows!
Re: Image::Magick on Windows!
by dree (Monsignor) on Nov 27, 2003 at 19:33 UTC
    If you are using ActiveState Perl 80x (but not 807), from the ppm console write:
    rep add beaucox http://ppm.beaucox.com
    and then
    s magick
    Now, you will see some entries and so you could install the module you need.
      Thank you!

      I have used the repository to install the full version of the Image::Magick module (containing the dlls). I am using ActiveState Perl 5.8.1.807 as you suggested NOT to....is this the reason that the module doesn't appear to be working well?
      "No matter where you go, there you are." Jeff Pflueger - Struggling Perl knowledge sponge
        > is this the reason that the module doesn't appear to be working well?

        I think so. AS Perl 807 is Perl 5.8.1 that is not fully binary compatible with Perl 5.8.0. You need to recompile the modules thas use XS (with AS Perl usually with MS Visual C++).
Re: Image::Magick on Windows!
by CountZero (Bishop) on Nov 27, 2003 at 21:06 UTC
    Do you care to give some pointers how you installed the basic ImageMagick magic stuff on Windows?

    I tried, but did not succeed and finally gave up.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Re: Image::Magick on Windows!
by PodMaster (Abbot) on Nov 28, 2003 at 07:28 UTC
    http://www.imagemagick.org/www/windows.html
    The installation package includes the ImageMagick Perl extension ( PerlMagick) as an installation option. If you would like to use this extension, then you must install ActiveState ActivePerl prior to commencing with installation of ImageMagick.

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Image::Magick on Windows!
by jeffpflueger (Beadle) on Nov 28, 2003 at 23:01 UTC
    What I have learned so far on getting PerlMagick up and running on Windows 2000:

    The site: http://www.imagemagick.org/www/windows.html doesn't seem to actually have a link to the ImageMagick windows installer. But do a search on google for: ImageMagick-5.5.7-12.zip and you will find the zip file containing the .exe file with the ImageMagick installer.

    Active State Perl does not in fact seem to provide the Perl Magick module as an option at installation as it claims. With ImageMagick 5.5.7 installed and working, when I install Active State Perl 5.8.1.807 the installer states that it will provide the installation of Perl Magick as an option if I have ImageMagick installed, but this does not in fact occur.

    So, I have now tried to install the module via the CPAN module (not much luck here), and then manually with MakeFile.pl (many errors given for libraries not found) and then nmake (error given because cl is not a recognizable executable), and finally had the best luck with ppm (make sure that you are using a repository with Image Magick...the comment above contains info on setting up ppm to point to a repository that does have image-magick)

    Here is what I learned about the ppm installation: If one does the FULL install of image-magick (available in the repository in an above message), this installs all the perl module stuff and the required ImageMagick dll's. This is probably the cleanest route because it is imperitive that the ImageMagick version and the PerlMagick version match. If they do not match you will have problems.
      And now....the module is installed, but the following code generates errors:

      #!c:/perl -w use strict; use Image::Magick; my $image = new Image::Magick; my $x = $image->Read("nettie.tif"); warn "$x" if "$x"; $x = $image->Scale(width=>"200", height=>"200"); warn "$x" if "$x"; $x = $image->Write("nettienew.tif"); warn "$x" if "$x";


      Here are the errors:
      Exception 420: NoDecodeDelegateForThisImageFormat (nettie.tif) at c:/image.pl line 8.

      Anybody have a suggestion about what might be happening?
        Problem Solved! Image::Magick now running on windows 2000! the problem seems to be synching the different builds of ActiveState Perl, ImageMagick and the PerlMagick module. I had to find an appropriate build of ActiveState Perl, and make sure that the Image::Magic module was the one that the version of ImageMagick I was installing matched. The best way to do the later was to use the version of ImageMagick that downloads the perl module stuff it requires at installation. Here's is how I finally got something to work:

        1) Install Active State Perl 5.8.0 build 806 available HERE
        builds 804 and 807 did not work.

        2) Install the nifty ImageMagick installer-type set-up that provides the Install Perl Magick module option. (ImageMagick-i686-pc-windows.exe)
        Available HERE

        Make sure that
        a) you check the box to install the perl magick stuff
        b) you have your machine connected to the internet. The installer will then install ImageMagick and a command prompt window will then pop-up as the Perl Magick stuff is downloaded from the internet.

        You should then be ready to go.

        Thank you for all of your help!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://310568]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-11-27 20:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (187 votes), past polls