diff --git a/src/Drivers/Imagick/Modifiers/CropResizeModifier.php b/src/Drivers/Imagick/Modifiers/CropResizeModifier.php index 6e8d1568..8a7b555d 100644 --- a/src/Drivers/Imagick/Modifiers/CropResizeModifier.php +++ b/src/Drivers/Imagick/Modifiers/CropResizeModifier.php @@ -26,7 +26,7 @@ class CropResizeModifier implements ModifierInterface foreach ($image as $frame) { if ($shouldCrop) { - $frame->getCore()->cropImage( + $frame->getCore()->extentImage( $this->crop->getWidth(), $this->crop->getHeight(), $this->crop->getPivot()->getX(), diff --git a/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php b/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php index 15e4c0dd..d04fae80 100644 --- a/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php +++ b/tests/Drivers/Gd/Modifiers/ResizeModifierTest.php @@ -3,12 +3,12 @@ namespace Intervention\Image\Tests\Drivers\Gd\Modifiers; use Intervention\Image\Drivers\Gd\Image; -use Intervention\Image\Drivers\Gd\Modifiers\ResizeModifier; +use Intervention\Image\Drivers\Gd\Modifiers\CropResizeModifier; use Intervention\Image\Geometry\Size; use Intervention\Image\Tests\TestCase; use Intervention\Image\Tests\Traits\CanCreateGdTestImage; -class ResizeModifierTest extends TestCase +class CropResizeModifierTest extends TestCase { use CanCreateGdTestImage; @@ -17,7 +17,7 @@ class ResizeModifierTest extends TestCase $image = $this->createTestImage('trim.png'); $this->assertEquals(50, $image->width()); $this->assertEquals(50, $image->height()); - $image->modify(new ResizeModifier(new Size(30, 20))); + $image->modify(new CropResizeModifier(new Size(50, 50), new Size(30, 20))); $this->assertEquals(30, $image->width()); $this->assertEquals(20, $image->height()); } diff --git a/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php b/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php index af8bca07..488ba23b 100644 --- a/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php +++ b/tests/Drivers/Imagick/Modifiers/ResizeModifierTest.php @@ -3,12 +3,12 @@ namespace Intervention\Image\Tests\Drivers\Imagick\Modifiers; use Intervention\Image\Drivers\Imagick\Image; -use Intervention\Image\Drivers\Imagick\Modifiers\ResizeModifier; +use Intervention\Image\Drivers\Imagick\Modifiers\CropResizeModifier; use Intervention\Image\Geometry\Size; use Intervention\Image\Tests\TestCase; use Intervention\Image\Tests\Traits\CanCreateImagickTestImage; -class ResizeModifierTest extends TestCase +class CropResizeModifierTest extends TestCase { use CanCreateImagickTestImage; @@ -17,7 +17,7 @@ class ResizeModifierTest extends TestCase $image = $this->createTestImage('trim.png'); $this->assertEquals(50, $image->width()); $this->assertEquals(50, $image->height()); - $image->modify(new ResizeModifier(new Size(30, 20))); + $image->modify(new CropResizeModifier(new Size(50, 50), new Size(30, 20))); $this->assertEquals(30, $image->width()); $this->assertEquals(20, $image->height()); }