1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-01 11:30:16 +02:00

fixed bug while pixelating small images

This commit is contained in:
Oliver Vogel
2014-05-13 16:23:32 +02:00
parent 6f22475780
commit 06f48792fc

View File

@@ -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;