You are here

protected function Colorshift::process in Imagick 8

File

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

Class

Colorshift
Defines imagick coloroverlay operation.

Namespace

Drupal\imagick\Plugin\ImageToolkit\Operation\imagick

Code

protected function process(Imagick $resource, array $arguments) {
  $color = $arguments['HEX'];
  $color = empty($color) ? 'none' : $color;
  return $resource
    ->colorizeImage(new ImagickPixel($color), 1, true);
}