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 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 includes/
image.inc - Gets details about an image.
- image_load in includes/
image.inc - Loads an image file and returns an image object.
- system_image_toolkit_settings in modules/
system/ system.admin.inc - Form builder; Configure site image toolkit usage.
- UserPictureTestCase::testWithGDinvalidDimension in modules/
user/ user.test - Do the test: GD Toolkit is installed Picture has invalid dimension
File
-
includes/
image.inc, line 63
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.