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

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

<?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;
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.