function image_imageinfo_cache_desaturate in Imageinfo Cache 7.3
Converts an image into grayscale.
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
File
- ./
imageinfo_cache.toolkit.inc, line 169 - Imageinfo Cache module. Pseudo image toolkit functions.
Code
function image_imageinfo_cache_desaturate($image) {
// Change toolkit back to the original value.
$image->toolkit = variable_get('image_toolkit_original', 'gd');
$return = image_toolkit_invoke('desaturate', $image);
// Change toolkit to the pseudo value again.
$image->toolkit = variable_get('image_toolkit', 'gd');
return $return;
}