You are here

function image_desaturate in Drupal 7

Converts an image to grayscale.

Parameters

$image: An image object returned by image_load().

Return value

TRUE on success, FALSE on failure.

See also

image_load()

image_gd_desaturate()

Related topics

2 calls to image_desaturate()
ImageToolkitUnitTest::testDesaturate in modules/simpletest/tests/image.test
Test the image_desaturate() function.
image_desaturate_effect in modules/image/image.effects.inc
Image effect callback; Desaturate (grayscale) an image resource.
4 string references to 'image_desaturate'
hook_image_default_styles in modules/image/image.api.php
Provide module-based image styles for reuse throughout Drupal.
hook_image_styles_alter in modules/image/image.api.php
Modify any image styles provided by other modules or the user.
ImageAdminStylesUnitTest::testDefaultStyle in modules/image/image.test
Test to override, edit, then revert a style.
ImageDimensionsTestCase::testImageDimensions in modules/image/image.test
Test styled image dimensions cumulatively.

File

includes/image.inc, line 354
API for manipulating images.

Code

function image_desaturate(stdClass $image) {
  return image_toolkit_invoke('desaturate', $image);
}