public function applyFilter(ImageInterface $image, FilterInterface $filter)
    {
        if ($filter instanceof ImagineAware) {
            if ($this->imagine === null) {
                throw new InvalidArgumentException(sprintf('In order to use %s pass an Imagine\Image\ImagineInterface instance to Transformation constructor', get_class($filter)));
            }
            $filter->setImagine($this->imagine);
        }

        return $filter->apply($image);
    }
public function applyFilter(ImageInterface $image, FilterInterface $filter)
    {
        if ($filter instanceof ImagineAware) {
            if ($this->imagine === null) {
                throw new InvalidArgumentException(sprintf('In order to use %s pass an Imagine\Image\ImagineInterface instance to Transformation constructor', get_class($filter)));
            }
            $filter->setImagine($this->imagine);
        }

        return $filter->apply($image);
    }
public function applyFilter ( ImageInterface $ image , FilterInterface $ filter ) { if ( $ filter instanceof ImagineAware ) { if ( $ this -> imagine === null ) { throw new InvalidArgumentException ( sprintf ( 'In order to use %s pass an Imagine\Image\ImagineInterface instance to Transformation constructor' , get_class ( $ filter ) ) ) ; } $ filter -> setImagine ( $ this -> imagine ) ; } return $ filter -> apply ( $ image ) ; }
Applies a given FilterInterface onto given ImageInterface and returns
modified ImageInterface

@param ImageInterface  $image
@param FilterInterface $filter

@return ImageInterface
@throws InvalidArgumentException
Applies a given FilterInterface onto given ImageInterface and returns modified ImageInterface