setOption() public method

Sets $value for $optionName.
public setOption ( string $optionName, mixed $value )
$optionName string
$value mixed
コード例 #1
0
 public function load(ImageInterface $image, array $options = array())
 {
     if (!empty($options)) {
         $this->filter->setOption('degrees', $options[0]);
     }
     return $this->filter->apply($image);
 }
コード例 #2
0
 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);
 }