Nalina has asked for the wisdom of the Perl Monks concerning the following question:

I downloaded ImageMagick-6.0.1-Q16-windows-dll.exe and installed it. I selected PerlMagick for activeperl while installing it. My script to copy an image is
#!/usr/local/bin/perl use Image::Magick; my($image, $x); $image = Image::Magick->new; $x = $image->Read('D:/d/FirewallRespTimebyDay.xls.0.PNG'); warn "$x" if "$x"; $x = $image->Crop(geometry=>'100x100"+100"+100'); warn "$x" if "$x"; $x = $image->Write('C:/Graph.xls.01.08.2004.PNG'); warn "$x" if "$x";
when I executed it, I got a pop up message saying
The procedure entry point LevelImageChannel could not be located in th +e dynamic link library CORE_RL_magick.dll
I also got an error in the command prompt saying
Can't load 'C:/Perl/site/lib/auto/Image/Magick/Magick.dll' for module +Image::Magick: load_file:The specified procedure could not be found a +t C:/Perl/lib/DynaLoader.pm line 229. at D:\image.pl line 2 Compilati +on failed in require at D:\image.pl line 2. BEGIN failed--compilation + aborted at D:\image.pl line 2.
How do I solve this?

Thanks & Regards

Nalina

Replies are listed 'Best First'.
Re: Problem with Image::Magick
by BrowserUk (Patriarch) on Aug 03, 2004 at 10:32 UTC

    Your installation is bad. This post, in combination with Image::Magick Error: no suitable installation target found for package Image-Magick. suggests that you have (somehow) installed (parts of) a PPM that was compiled for use with one version of perl, but are trying to use it with a different version of perl.

    For example: A PPM built for use with perl 5.6.x, will rarely work correctly for perl v5.8.x.

    PPM checks the version information embedded in the PPD file and cross-references this with the version of perl it is running under. It will not allow you to go ahead with the install if there is a mismatch. This is the most likely source of the error message you posted at Image::Magick Error: no suitable installation target found for package Image-Magick.. At least one person asked you to tell use which version of Perl (perl -V) you are running, but you declined to answer.

    It's not clear how you have (or even if you have) bypassed the error message issued when PPM refused to install I::M for the wrong version of perl, but you will not succeed in going forward until you have corrected that error.

    The ONLY ways of correcting that error are:

    1. Locate a .ppd/.ppm pair that correspond with the version of perl you are running.
    2. Obtain a compiler and build it from sources.

    If you had responded to some of the questions asked in this and your other thread, you would probably have received more and better help with this.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
Re: Problem with Image::Magick
by inman (Curate) on Aug 03, 2004 at 10:38 UTC
    Have you added the Image Magic directory to your PATH? It looks like the supporting Dlls cannot be found. I was able to reproduce the error by removing the Image Magic install directory from the PATH.