public function apply($image)
{
$size = $this->amount;
$width = $image->getWidth();
$height = $image->getHeight();
$image->getCore()->scaleImage(max(1, $width / $size), max(1, $height / $size));
$image->getCore()->scaleImage($width, $height);
return $image;
}