On this page
function image_get_toolkit
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
File
- 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;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!image.inc/function/image_get_toolkit/7.x