Colorshift.php in Image Effects 8
Same filename in this branch
Same filename and directory in other branches
File
src/Plugin/ImageToolkit/Operation/imagemagick/Colorshift.phpView source
<?php
namespace Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick;
use Drupal\image_effects\Plugin\ImageToolkit\Operation\ColorshiftTrait;
use Drupal\imagemagick\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickImageToolkitOperationBase;
/**
* Defines ImageMagick Colorshift operation.
*
* @ImageToolkitOperation(
* id = "image_effects_imagemagick_colorshift",
* toolkit = "imagemagick",
* operation = "colorshift",
* label = @Translation("Colorshift"),
* description = @Translation("Shift image colors.")
* )
*/
class Colorshift extends ImagemagickImageToolkitOperationBase {
use ColorshiftTrait;
/**
* {@inheritdoc}
*/
protected function execute(array $arguments) {
$this
->getToolkit()
->addArgument("+level-colors " . $this
->getToolkit()
->escapeShellArg($arguments['RGB']) . ",white");
return TRUE;
}
}
Classes
Name | Description |
---|---|
Colorshift | Defines ImageMagick Colorshift operation. |