Drupal 8  8.0.2
DesaturateImageEffect Class Reference
Inheritance diagram for DesaturateImageEffect:

Public Member Functions

 applyEffect (ImageInterface $image)
- Public Member Functions inherited from ImageEffectBase
 __construct (array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger)
 transformDimensions (array &$dimensions, $uri)
 getDerivativeExtension ($extension)
 getSummary ()
 label ()
 getUuid ()
 setWeight ($weight)
 getWeight ()
 getConfiguration ()
 setConfiguration (array $configuration)
 defaultConfiguration ()
 calculateDependencies ()
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 getPluginDefinition ()

Additional Inherited Members

- Static Public Member Functions inherited from ImageEffectBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
- Protected Attributes inherited from ImageEffectBase
 $weight = ''

Detailed Description

Desaturates (grayscale) an image resource.

( id = "image_desaturate", label = ("Desaturate"), description = ("Desaturate converts an image to grayscale.") )

Member Function Documentation

applyEffect ( ImageInterface  $image)

{Applies an image effect to the image object.

\Drupal\Core\Image\ImageInterface$imageAn image file object.
bool TRUE on success. FALSE if unable to perform the image effect on the image.

Implements ImageEffectInterface.

References ImageInterface\desaturate(), ImageInterface\getHeight(), ImageInterface\getMimeType(), ImageInterface\getSource(), ImageInterface\getToolkitId(), ImageInterface\getWidth(), and Drupal\logger().

Here is the call graph for this function:

The documentation for this class was generated from the following file: