image_toolkit_invoke

Versions
4.6 – 6
image_toolkit_invoke($method, $params = array())
7
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

▾ 7 functions call image_toolkit_invoke()

image_crop in includes/image.inc
Crop an image to the rectangle specified by the given rectangle.
image_desaturate in includes/image.inc
Convert an image to grayscale.
image_get_info in includes/image.inc
Get details about an image.
image_load in includes/image.inc
Load an image file and return an image object.
image_resize in includes/image.inc
Resize an image to the given dimensions (ignoring aspect ratio).
image_rotate in includes/image.inc
Rotate an image by the given number of degrees.
image_save in includes/image.inc
Close the image and save the changes to a file.

Code

includes/image.inc, line 90

<?php
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;
}
?>
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.