image_effect_apply

Versions
7
image_effect_apply($image, $effect)

Given an image object and effect, perform the effect on the file.

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.

Code

modules/image/image.module, line 994

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.