Grafika\Imagick\Filter\Pixelate::apply PHP Method

apply() public method

public apply ( Image $image ) : Image
$image Grafika\Imagick\Image
return Grafika\Imagick\Image
    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;
    }