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

apply() public method

Apply filter.
public apply ( Image $image ) : Image
$image Grafika\Imagick\Image
return Grafika\Imagick\Image
    public function apply($image)
    {
        if ($this->type === 'ordered') {
            return $this->ordered($image);
        } else {
            if ($this->type === 'diffusion') {
                return $this->diffusion($image);
            }
        }
        throw new \Exception(sprintf('Invalid dither type "%s".', $this->type));
    }