You are here

protected function Crop::process in Imagick 8

File

src/Plugin/ImageToolkit/Operation/imagick/Crop.php, line 26

Class

Crop
Defines imagick crop operation.

Namespace

Drupal\imagick\Plugin\ImageToolkit\Operation\imagick

Code

protected function process(Imagick $resource, array $arguments) {
  $success = $resource
    ->cropImage($arguments['width'], $arguments['height'], $arguments['x'], $arguments['y']);
  $resource
    ->setImagePage($arguments['width'], $arguments['height'], 0, 0);
  return $success;
}