You are here

function iek_toolkit_invoke in Image effect kit 7

Invokes the given method using the currently selected toolkit.

Parameters

string $method: A string containing the method to invoke.

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

array $params: An optional array of parameters to pass to the toolkit method.

Return value

bool Mixed values (typically Boolean indicating successful operation).

7 calls to iek_toolkit_invoke()
iek_image_border in ./iek.module
Invoke the image toolkit so user can choose to use GD or ImageMagick.
iek_image_corner in ./iek.module
Invoke the image toolkit so user can choose to use GD or ImageMagick.
iek_image_filter in ./iek.module
Invoke the image toolkit so user can choose to use GD or ImageMagick.
iek_image_overlay in ./iek.module
Invoke the image toolkit so user can choose to use GD or ImageMagick.
iek_image_padding in ./iek.module
Invoke the image toolkit so user can choose to use GD or ImageMagick.

... See full list

File

./iek.module, line 1220
Primarily Drupal hooks and global API functions to manipulate image styles.

Code

function iek_toolkit_invoke($method, stdClass $image, array $params = array()) {
  $function = 'iek_' . $image->toolkit . '_' . $method;
  if (function_exists($function)) {
    array_unshift($params, $image);
    return call_user_func_array($function, $params);
  }
  watchdog('image', 'The selected image handling toolkit %toolkit can not correctly process %function.', array(
    '%toolkit' => $image->toolkit,
    '%function' => $function,
  ), WATCHDOG_ERROR);
  return FALSE;
}