You are here

protected function Convolve::process in Imagick 8

File

src/Plugin/ImageToolkit/Operation/imagick/Convolve.php, line 35

Class

Convolve
Defines imagick sharpen operation.

Namespace

Drupal\imagick\Plugin\ImageToolkit\Operation\imagick

Code

protected function process(Imagick $resource, array $arguments) {
  $matrix = $arguments['matrix']['entries'];
  array_walk_recursive($matrix, function (&$value) {
    $value = (int) $value;
  });
  return $resource
    ->convolveImage(ImagickKernel::fromMatrix($matrix));
}