diff --git a/src/Gmagick/Effects.php b/src/Gmagick/Effects.php index f62cc42ae..d918c5779 100644 --- a/src/Gmagick/Effects.php +++ b/src/Gmagick/Effects.php @@ -82,7 +82,7 @@ public function negative() public function grayscale() { try { - $this->gmagick->setImageType(2); + $this->gmagick->setimagetype(2); } catch (\GmagickException $e) { throw new RuntimeException('Failed to grayscale the image', $e->getCode(), $e); } @@ -118,7 +118,7 @@ public function sharpen() public function blur($sigma = 1) { try { - $this->gmagick->blurImage(0, $sigma); + $this->gmagick->blurimage(0, $sigma); } catch (\GmagickException $e) { throw new RuntimeException('Failed to blur the image', $e->getCode(), $e); } @@ -168,7 +168,7 @@ public function convolve(Matrix $matrix) } try { $this->gmagick->convolveimage($matrix->getValueList()); - } catch (\ImagickException $e) { + } catch (\GmagickException $e) { throw new RuntimeException('Failed to convolve the image'); } diff --git a/tests/tests/Gmagick/EffectsTest.php b/tests/tests/Gmagick/EffectsTest.php index ac86301c7..04ec0d68e 100644 --- a/tests/tests/Gmagick/EffectsTest.php +++ b/tests/tests/Gmagick/EffectsTest.php @@ -40,7 +40,7 @@ protected function setUpBase() */ public function testColorize() { - $this->isGoingToThrowException('Imagine\Exception\RuntimeException'); + $this->isGoingToThrowException('Imagine\Exception\NotSupportedException'); parent::testColorize(); }