You are here

class Colorshift in Image Effects 8.2

Same name in this branch
  1. 8.2 src/Plugin/ImageToolkit/Operation/gd/Colorshift.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\gd\Colorshift
  2. 8.2 src/Plugin/ImageToolkit/Operation/imagemagick/Colorshift.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Colorshift
Same name and namespace in other branches
  1. 8.3 src/Plugin/ImageToolkit/Operation/imagemagick/Colorshift.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Colorshift
  2. 8 src/Plugin/ImageToolkit/Operation/imagemagick/Colorshift.php \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Colorshift

Defines ImageMagick Colorshift operation.

Plugin annotation


@ImageToolkitOperation(
  id = "image_effects_imagemagick_colorshift",
  toolkit = "imagemagick",
  operation = "colorshift",
  label = @Translation("Colorshift"),
  description = @Translation("Shift image colors.")
)

Hierarchy

  • class \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Colorshift extends \Drupal\imagemagick\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickImageToolkitOperationBase uses ColorshiftTrait

Expanded class hierarchy of Colorshift

File

src/Plugin/ImageToolkit/Operation/imagemagick/Colorshift.php, line 19

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick
View source
class Colorshift extends ImagemagickImageToolkitOperationBase {
  use ColorshiftTrait;

  /**
   * {@inheritdoc}
   */
  protected function execute(array $arguments) {
    $this
      ->addArgument("+level-colors " . $this
      ->escapeArgument($arguments['RGB']) . ",white");
    return TRUE;
  }

}

Members