function image_get_toolkit

7.x image.inc image_get_toolkit()
6.x 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

8 calls to image_get_toolkit()
FileValidatorTest::testFileValidateImageResolution in drupal-7.x/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-7.x/includes/image.inc
Gets details about an image.
image_load in drupal-7.x/includes/image.inc
Loads an image file and returns an image object.
system_image_toolkit_settings in drupal-7.x/modules/system/system.admin.inc
Form builder; Configure site image toolkit usage.
UserPictureTestCase::testWithGDinvalidDimension in drupal-7.x/modules/user/user.test
Do the test: GD Toolkit is installed Picture has invalid dimension

... See full list

File

drupal-7.x/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;
}