From 06f48792fcb7653fc7c9e62152d1f62e071f6b84 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Tue, 13 May 2014 16:23:32 +0200 Subject: [PATCH] fixed bug while pixelating small images --- src/Intervention/Image/Imagick/Commands/PixelateCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Intervention/Image/Imagick/Commands/PixelateCommand.php b/src/Intervention/Image/Imagick/Commands/PixelateCommand.php index 5ebb88d6..f7d1cb77 100644 --- a/src/Intervention/Image/Imagick/Commands/PixelateCommand.php +++ b/src/Intervention/Image/Imagick/Commands/PixelateCommand.php @@ -11,7 +11,7 @@ class PixelateCommand extends \Intervention\Image\Commands\AbstractCommand $width = $image->getWidth(); $height = $image->getHeight(); - $image->getCore()->scaleImage($width / $size, $height / $size); + $image->getCore()->scaleImage(max(1, ($width / $size)), max(1, ($height / $size))); $image->getCore()->scaleImage($width, $height); return true;