You are here

function image_get_available_toolkits in Drupal 4

Same name and namespace in other branches
  1. 5 includes/image.inc \image_get_available_toolkits()
  2. 6 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.

1 call to image_get_available_toolkits()
system_view_general in modules/system.module

File

includes/image.inc, line 8

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'];
    }
  }
  $output['gd'] = t('Built-in GD2 toolkit');
  return $output;
}