get not working?

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

get not working?

Post by wpns »

From http://www.imagemagick.org/script/perl- ... -attribute I'm trying to use ->Get( but only get the error message:

Can't locate object method "Get" via package "Exception 410: unrecognized option `metric'" (perhaps you forgot to load "Exception 410: unrecognized option `metric'"?)

I've even tried the sample program:
use Image::Magick;

$logo=Image::Magick->New();
$logo->Read('logo:');
$sharp=Image::Magick->New();
$sharp->Read('logo:');
$sharp->Sharpen('0x1');
$difference=$logo->Compare(image=>$sharp, metric=>'rmse');
print $difference->Get('error'), "\n";

and get the same error.

I'm running ImageMagick 6.2.8.0-4 and the associated ImageMagick-perl-6.2.8.0-4, is ->Get( supposed to be in there?

Thanks!

User avatar
magick
Site Admin
Posts: 11125
Joined: 2003-05-31T11:32:55-07:00

Re: get not working?

Post by magick »

Upgrade! The current version of ImageMagick is 6.5.6-9. We tried your script and got:
  • -> perl compare.pl
    0.0235200130334416

wpns

Re: get not working?

Post by wpns »

That was my first thought, but I can't find perlmagick-6.5.6 anywhere.
http://www.imagemagick.org/script/perl-magick.php says it's at
http://www.imagemagick.org/script/download.php but
ftp://ftp.imagemagick.org/pub/ImageMagick/ only has
a /perl/ subdirectory, which has
ftp://ftp.imagemagick.org/pub/ImageMagi ... .53.tar.gz in it

Is that the right place, or right file at all?

Also, there are instructions to:

/*
Next, edit Makefile.PL and change LIBS and INC to include the appropriate path information to the required MagickCore library. You may need paths to JPEG, PNG, TIFF, etc. delegates if they were included with your installed version of ImageMagick.
*/

I don't know how to do this at all?

[I'm running those old versions because there were RPMs I could install on my Centos system...]

Thanks!

User avatar
magick
Site Admin
Posts: 11125
Joined: 2003-05-31T11:32:55-07:00

Re: get not working?

Post by magick »

Try upgrading from source, it include PerlMagick. Type
  • tar xvfz ImageMagick-6.5.6-9.tar.gz
    cd ImageMagick-6.5.6-9
    ./configure
    make
    make install
    cd PerlMagick
    perl Makefile.PL
    make install

wpns

Re: get not working?

Post by wpns »

That did it, many thanks!

[now to see how much faster PerlMagick is than calling Magick functions using system calls.]

Post Reply