in reply to (tye)Re: can't find macro in Image::Magick
in thread can't find macro in Image::Magick

Thanks for pointing out a typo ;-) However the problem still occurs:

$crop_size = int($v - $max_size);
print "Crop size $crop_size\n";
$x = $image->Shave(width=>$crop_size);

Output:

Crop size 218
Your vendor has not defined PerlMagick macro main::Shave

Can't figure it out, because a numeric value works, so do other methods like Crop! Can someone else try it on their systems?
  • Comment on Re: (tye)Re: can't find macro in Image::Magick

Replies are listed 'Best First'.
(tye)Re2: can't find macro in Image::Magick
by tye (Sage) on Nov 22, 2001 at 00:38 UTC

    Note that this error message probably means that AUTOLOAD is being invoked. So one thought I had was that Shave() isn't available in your version of PerlMagick (but you imply that $image->Shave(width=>218) works). I don't understand why it is saying "main::Shave", though...

    After downloading PerlMagick, I see that the "main::" part is just due to some strange code in PerlMagick's AUTOLOAD which I think just needs to be removed. But that has no bearing on your problem.

    So I'm even more convinced that somehow your version of PerlMagick doesn't have a Shave() method and that $image->Shave(width=>218) will not work.

            - tye (but my friends call me "Tye")
      no, unfortunately, this works fine:

      $x = $image->Shave(width=>218);

      That's OK, I can just use Crop and I'll shoot an email to the PerlMagick developer. Thanks for the help!