diff --git a/src/Intervention/Image/Imagick/Commands/PixelateCommand.php b/src/Intervention/Image/Imagick/Commands/PixelateCommand.php index 6fe79491..66a3205d 100644 --- a/src/Intervention/Image/Imagick/Commands/PixelateCommand.php +++ b/src/Intervention/Image/Imagick/Commands/PixelateCommand.php @@ -19,7 +19,7 @@ class PixelateCommand extends AbstractCommand $width = $image->getWidth(); $height = $image->getHeight(); - $image->getCore()->scaleImage(max(1, ($width / $size)), max(1, ($height / $size))); + $image->getCore()->scaleImage(max(1, intval($width / $size)), max(1, intval($height / $size))); $image->getCore()->scaleImage($width, $height); return true; diff --git a/src/Intervention/Image/Size.php b/src/Intervention/Image/Size.php index f8b6dc8e..b1f26e40 100644 --- a/src/Intervention/Image/Size.php +++ b/src/Intervention/Image/Size.php @@ -71,7 +71,7 @@ class Size */ public function getWidth() { - return $this->width; + return intval($this->width); } /** @@ -81,7 +81,7 @@ class Size */ public function getHeight() { - return $this->height; + return intval($this->height); } /**