function image_toolkit_invoke
image_toolkit_invoke($method, stdClass $image, array $params = array())
Invokes the given method using the currently selected toolkit.
Parameters
$method: A string containing the method to invoke.
$image: An image object returned by image_load().
$params: An optional array of parameters to pass to the toolkit method.
Return value
Mixed values (typically Boolean indicating successful operation).
Related topics
File
- includes/image.inc, line 93
- API for manipulating images.
Code
function image_toolkit_invoke($method, stdClass $image, array $params = array()) { $function = 'image_' . $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; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!image.inc/function/image_toolkit_invoke/7.x