function 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

8 calls to image_get_toolkit()
FileValidatorTest::testFileValidateImageResolution in drupal/modules/simpletest/tests/file.test
This ensures the resolution of a specific file is within bounds. The image will be resized if it's too large.
image_get_info in drupal/includes/image.inc
Gets details about an image.
image_load in drupal/includes/image.inc
Loads an image file and returns an image object.
system_image_toolkit_settings in drupal/modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.
UserPictureTestCase::testWithGDinvalidDimension in drupal/modules/user/user.test
Do the test: GD Toolkit is installed Picture has invalid dimension

... See full list

File

drupal/includes/image.inc, line 63
API for manipulating images.

Code

function image_get_toolkit() {
  static $toolkit;
  if (!isset($toolkit)) {
    $toolkits = image_get_available_toolkits();
    $toolkit = variable_get('image_toolkit', 'gd');
    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.
      reset($toolkits);
      $toolkit = key($toolkits);
    }
  }
  return $toolkit;
}