Mejenborg
Mejenborg

Reputation: 63

Call to undefined method Imagick::setImageClipMask()

I'm trying to run the example on php.net/imagick.setimageclipmask but with no luck.

Running it CLI and instead of returning the result, i save it to a file.

Anyone else run into a similar problem?

OS X 10.13.3, PHP 7.2.2, imagick module 3.4.3, ImageMagic 7.0.7-23

EDIT: I've tried to uninstall and completely reinstalled it via Brew.

Brew install -s imagemagic
brew install -s php72-imagick

Upvotes: 0

Views: 675

Answers (1)

emcconville
emcconville

Reputation: 24439

The MagickSetImageClipMask & MagickGetImageClipMask methods have been deprecated & removed from ImageMagick 7. Because they no longer exist in the C-API MagickWand library, the PHP Imagick module excludes the methods.

To quote the source-code of imagick_class.c ...

...
#if MagickLibVersion < 0x700
PHP_METHOD(imagick, setimageclipmask)
{
   ...

Either downgrade to ImageMagick-6, or jump over to the developers forum & ask the authors what a preferred replacement/alternative would be.

Upvotes: 1

Related Questions