function image_effect_apply

Applies an image effect to the image object.

Parameters

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

$effect: An image effect array.

Return value

TRUE on success. FALSE if unable to perform the image effect on the image.

1 call to image_effect_apply()
image_style_create_derivative in modules/image/image.module
Creates a new image derivative based on an image style.

File

modules/image/image.module, line 1418

Code

function image_effect_apply($image, $effect) {
    module_load_include('inc', 'image', 'image.effects');
    $function = $effect['effect callback'];
    if (function_exists($function)) {
        return $function($image, $effect['data']);
    }
    return FALSE;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.