1 image.inc image_get_toolkit()

Gets the name of the currently used toolkit.

Return value

String containing the name of the selected toolkit, or FALSE on error.:

Related topics


core/includes/image.inc, line 60
API for manipulating images.


function image_get_toolkit() {
  static $toolkit;

  if (!isset($toolkit)) {
    $toolkits = image_get_available_toolkits();
    $toolkit = config_get('system.core', 'image_toolkit');
    if (!isset($toolkits[$toolkit]) || !function_exists('image_' . $toolkit . '_load')) {
      // The selected toolkit isn't available so return the first one found. If
      // none are available this will return FALSE.
      $toolkit = key($toolkits);

  return $toolkit;