You are here

function imagecache_customactions_image in ImageCache Actions 6

Same name and namespace in other branches
  1. 6.2 customactions/imagecache_customactions.module \imagecache_customactions_image()

Implementation of hook_image()

Parameters

$image:

$action:

File

./imagecache_customactions.module, line 120
Allow advanced users to code their own PHP image manipulation routines as part of imagecache processing.

Code

function imagecache_customactions_image($image, $action) {

  // Pull the images $width and $height out to play
  @extract($image->info);

  // And maybe the owner node data could be useful
  if (function_exists('imagecache_actions_node_from_filepath')) {
    $node = imagecache_actions_node_from_filepath($image->source);
  }
  $result = eval($action['text']);
  return $result;
}