From 3918c1d8a9de8ffa72b1288f943f9dc503e9658b Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Fri, 1 Jun 2018 09:47:14 -0700 Subject: [PATCH] ImageMagickHandler changes, by request --- system/Images/Handlers/ImageMagickHandler.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/system/Images/Handlers/ImageMagickHandler.php b/system/Images/Handlers/ImageMagickHandler.php index e8036a8870..a720730909 100644 --- a/system/Images/Handlers/ImageMagickHandler.php +++ b/system/Images/Handlers/ImageMagickHandler.php @@ -47,7 +47,7 @@ use CodeIgniter\Images\Image; * * hmm - the width & height accessors at the end use the imagick extension. * - * FIXME - This needs conversion to use the imagick extension + * FIXME - This needs conversion & unit testing, to use the imagick extension * * @package CodeIgniter\Images\Handlers */ @@ -68,14 +68,6 @@ class ImageMagickHandler extends BaseHandler public function __construct($config = null) { parent::__construct($config); - - // We should never see this, so can't test it - // @codeCoverageIgnoreStart - if ( ! extension_loaded('imagick')) - { - throw ImageException::forMissingExtension('imagick'); - } - // @codeCoverageIgnoreEnd } //-------------------------------------------------------------------- @@ -434,12 +426,12 @@ class ImageMagickHandler extends BaseHandler public function _getWidth() { - return $this->resource->getImageWidth(); + return imagesx($this->resource); } public function _getHeight() { - return $this->resource->getImageHeight(); + return imagesy($this->resource); }