image_toolkit_invoke

Versions
5 – 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.

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

Return value

Mixed values (typically Boolean indicating successful operation).

Related topics

▾ 6 functions call image_toolkit_invoke()

image_crop in drupal-6/includes/image.inc
Crop an image to the rectangle specified by the given rectangle.
image_resize in drupal-6/includes/image.inc
Resize an image to the given dimensions (ignoring aspect ratio).
image_rotate in drupal-6/includes/image.inc
Rotate an image by the given number of degrees.
image_scale in drupal-6/includes/image.inc
Scales an image to the given width and height while maintaining aspect ratio.
image_scale_and_crop in drupal-6/includes/image.inc
Scales an image to the exact width and height given. Achieves the target aspect ratio by cropping the original image equally on both sides, or equally on the top and bottom. This function is, for example, useful to create uniform sized avatars from...
system_image_toolkit_settings in drupal-6/modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.

Code

drupal-6/includes/image.inc, line 87

<?php
function image_toolkit_invoke($method, $params = array()) {
  if ($toolkit = image_get_toolkit()) {
    $function = 'image_'. $toolkit .'_'. $method;
    if (function_exists($function)) {
      return call_user_func_array($function, $params);
    }
    else {
      watchdog('php', 'The selected image handling toolkit %toolkit can not correctly process %function.', array('%toolkit' => $toolkit, '%function' => $function), WATCHDOG_ERROR);
      return FALSE;
    }
  }
}
?>

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options