You are here

function _imageapi_optimize_invoke in Image Optimize (or ImageAPI Optimize) 7

Same name and namespace in other branches
  1. 6 imageapi_optimize.module \_imageapi_optimize_invoke()

Helper. Based on image_toolkit_invoke()

2 calls to _imageapi_optimize_invoke()
image_imageapi_optimize_load in ./imageapi_optimize.module
Load callback for the imageapi_optimize image toolkit.
image_imageapi_optimize_save in ./imageapi_optimize.module
Save callback for the imageapi_optimize image toolkit.

File

./imageapi_optimize.module, line 223
Image optimize functionalities.

Code

function _imageapi_optimize_invoke($method, $image, array $params = array()) {
  $function = 'image_' . variable_get('imageapi_optimize_toolkit', '') . '_' . $method;
  if (function_exists($function)) {
    array_unshift($params, $image);
    return call_user_func_array($function, $params);
  }
  return FALSE;
}