You are here

class Invert in Image Effects 8

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

Defines ImageMagick Invert operation.

Plugin annotation


@ImageToolkitOperation(
  id = "image_effects_imagemagick_invert",
  toolkit = "imagemagick",
  operation = "invert",
  label = @Translation("Invert"),
  description = @Translation("Replace each pixel with its complementary color.")
)

Hierarchy

  • class \Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick\Invert extends \Drupal\imagemagick\Plugin\ImageToolkit\Operation\imagemagick\ImagemagickImageToolkitOperationBase

Expanded class hierarchy of Invert

File

src/Plugin/ImageToolkit/Operation/imagemagick/Invert.php, line 18

Namespace

Drupal\image_effects\Plugin\ImageToolkit\Operation\imagemagick
View source
class Invert extends ImagemagickImageToolkitOperationBase {

  /**
   * {@inheritdoc}
   */
  protected function arguments() {

    // This operation does not use any parameters.
    return [];
  }

  /**
   * {@inheritdoc}
   */
  protected function execute(array $arguments) {
    $this
      ->getToolkit()
      ->addArgument('-negate');
    return TRUE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Invert::arguments protected function
Invert::execute protected function