InvertImageEffect.php in Image Effects 8
Same filename and directory in other branches
Namespace
Drupal\image_effects\Plugin\ImageEffectFile
src/Plugin/ImageEffect/InvertImageEffect.phpView source
<?php
namespace Drupal\image_effects\Plugin\ImageEffect;
use Drupal\Core\Image\ImageInterface;
use Drupal\image\ImageEffectBase;
/**
* Strips metadata from an image resource.
*
* @ImageEffect(
* id = "image_effects_invert",
* label = @Translation("Invert"),
* description = @Translation("Invert image color.")
* )
*/
class InvertImageEffect extends ImageEffectBase {
/**
* {@inheritdoc}
*/
public function applyEffect(ImageInterface $image) {
return $image
->apply('invert');
}
}
Classes
Name![]() |
Description |
---|---|
InvertImageEffect | Strips metadata from an image resource. |