eZ\Bundle\EzPublishCoreBundle\Imagine\Filter\Loader\ReduceNoiseFilterLoader::load PHP Method

load() public method

public load ( Imagine\Image\ImageInterface $image, array $options = [] )
$image Imagine\Image\ImageInterface
$options array
    public function load(ImageInterface $image, array $options = array())
    {
        if (!$image instanceof ImagickImage && !$image instanceof GmagickImage) {
            throw new NotSupportedException('ReduceNoiseFilterLoader is only compatible with "imagick" and "gmagick" drivers');
        }
        if (!empty($options)) {
            $this->filter->setOption('radius', $options[0]);
        }
        return $this->filter->apply($image);
    }

Usage Example

 /**
  * @expectedException \Imagine\Exception\NotSupportedException
  */
 public function testLoadInvalidDriver()
 {
     $this->loader->load($this->getMock('\\Imagine\\Image\\ImageInterface'));
 }
ReduceNoiseFilterLoader