From: Michael J. Rubinsky Date: Sun, 26 Sep 2010 20:12:44 +0000 (-0400) Subject: Don't attempt this if we don't have the lqr library X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f38981af64090f7b5cf5b441ec76dd390c93d3f7;p=horde.git Don't attempt this if we don't have the lqr library --- diff --git a/framework/Image/lib/Horde/Image/Effect/Imagick/LiquidResize.php b/framework/Image/lib/Horde/Image/Effect/Imagick/LiquidResize.php index 6227c3e30..cbc0d8d3c 100644 --- a/framework/Image/lib/Horde/Image/Effect/Imagick/LiquidResize.php +++ b/framework/Image/lib/Horde/Image/Effect/Imagick/LiquidResize.php @@ -31,8 +31,14 @@ class Horde_Image_Effect_Imagick_LiquidResize extends Horde_Image_Effect { $this->_params = new Horde_Support_Array($this->_params); try { - $this->_image->imagick->liquidRescaleImage( - $this->_params->width, $this->_params->height, $this->_params->delta_x, $this->_params['rigidity']); + // Only supported if ImageMagick is compiled against lqr library. + if (method_exists($this->_image, 'liquidRescaleImage')) { + $this->_image->imagick->liquidRescaleImage( + $this->_params->width, $this->_params->height, $this->_params->delta_x, $this->_params['rigidity']); + } else { + throw new Horde_Image_Exception('Missing support for lqr in ImageMagick.'); + } + } catch (ImagickException $e) { throw new Horde_Image_Exception($e); }