function ImageToolkitInterface::desaturate

Converts an image resource to grayscale.

Note that transparent GIFs loose transparency when desaturated.

Parameters

object $image: An image object. The $image->resource value will be modified by this call.

Return value

bool TRUE or FALSE, based on success.

See also

image_desaturate()

2 methods override ImageToolkitInterface::desaturate()
GDToolkit::desaturate in drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkit/GDToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::desaturate().
TestToolkit::desaturate in drupal/core/modules/system/tests/modules/image_test/lib/Drupal/image_test/Plugin/ImageToolkit/TestToolkit.php
Implements \Drupal\system\Plugin\ImageToolkitInterface::desaturate().

File

drupal/core/modules/system/lib/Drupal/system/Plugin/ImageToolkitInterface.php, line 108
Contains \Drupal\system\Plugin\ImageToolkitInterface.

Class

ImageToolkitInterface
Defines an interface for image toolkits.

Namespace

Drupal\system\Plugin

Code

function desaturate($image);