You are here

function image_get_available_toolkits in Drupal 6

Same name and namespace in other branches
  1. 4 includes/image.inc \image_get_available_toolkits()
  2. 5 includes/image.inc \image_get_available_toolkits()
  3. 7 includes/image.inc \image_get_available_toolkits()

Return a list of available toolkits.

Return value

An array of toolkit name => descriptive title.

Related topics

1 call to image_get_available_toolkits()
system_image_toolkit_settings in modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.

File

includes/image.inc, line 38
API for manipulating images.

Code

function image_get_available_toolkits() {
  $toolkits = file_scan_directory('includes', 'image\\..*\\.inc$');
  $output = array();
  foreach ($toolkits as $file => $toolkit) {
    include_once "./{$file}";
    $function = str_replace('.', '_', $toolkit->name) . '_info';
    if (function_exists($function)) {
      $info = $function();
      $output[$info['name']] = $info['title'];
    }
  }
  return $output;
}