image_get_available_toolkits

Definition

image_get_available_toolkits()
drupal/includes/image.inc, line 40

Description

Return a list of available toolkits.

Return value

An array of toolkit name => descriptive title.

Related topics

Namesort iconDescription
Image toolkitsDrupal's image toolkits provide an abstraction layer for common image file manipulations like scaling, cropping, and rotating. The abstraction frees module authors from the need to support multiple image libraries, and it allows site...

Code

function image_get_available_toolkits() {
  // hook_image_toolkits returns an array of toolkit names.
  $toolkits = module_invoke_all('image_toolkits');

  $output = array();
  foreach ($toolkits as $name) {
    $function = 'image_' . $name . '_info';
    if (drupal_function_exists($function)) {
      $info = $function();
      $output[$info['name']] = $info['title'];
    }
  }
  return $output;
}