image_get_available_toolkits
Definition
image_get_available_toolkits()
includes/image.inc, line 40
Description
Return a list of available toolkits.
Return value
An array of toolkit name => descriptive title.
Related topics
| Name | Description |
|---|---|
| Image toolkits | Drupal'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
<?php
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;
}
?> 