Definition

image_get_toolkit()
drupal/includes/image.inc, line 61

Description

Retrieve the name of the currently used toolkit.

Return value

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

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

function image_get_toolkit() {
  static $toolkit;

  if (!$toolkit) {
    $toolkit = variable_get('image_toolkit', 'gd');
    if (isset($toolkit) &&
      drupal_function_exists("image_" . $toolkit . "_resize")) {
    }
    elseif (!drupal_function_exists("image_gd_check_settings") ||
      !image_gd_check_settings()) {
      $toolkit = FALSE;
    }
  }

  return $toolkit;
}