function imagepicker_image_check_functions in Image Picker 6.2
Same name and namespace in other branches
- 7 imagepicker.functions.inc \imagepicker_image_check_functions()
Adapted from watermark module.
Return value
Status of function availability.
8 calls to imagepicker_image_check_functions()
- imagepicker_copy_form in ./
imagepicker.functions.inc - Function to generate the copy form
- imagepicker_import_form in ./
imagepicker.import.inc - Function to display the image import form.
- imagepicker_postlet_do in contribs/
imagepicker_postlet/ imagepicker_postlet.module - Function to process the postlet applet callbacks
- imagepicker_postlet_upload in contribs/
imagepicker_postlet/ imagepicker_postlet.module - Function to display the postlet applet
- imagepicker_settings_form in ./
imagepicker.admin.inc - Function to display the imagepicker admin settings form
File
- ./
imagepicker.functions.inc, line 2476 - Imagepicker functions
Code
function imagepicker_image_check_functions($silent = FALSE) {
$errors = 0;
$function_list = array();
$function_list[] = 'imagecopy';
$function_list[] = 'imagecopyresampled';
$function_list[] = 'imagedestroy';
$types = array(
'gif',
'jpeg',
'png',
'wbmp',
);
foreach ($types as $type) {
$function_list[] = 'image' . $type;
$function_list[] = 'imagecreatefrom' . $type;
}
foreach ($function_list as $function) {
if (!function_exists($function)) {
if (!$silent) {
drupal_set_message(t('Function %func does not exist. Advanced image manipulation cannot be done. Please make sure that you are running PHP 4.3 or higher, or that you (or your hosting provider) enable the GD library and exif in your PHP installation.', array(
'%func' => $function,
)), 'warning');
}
$errors++;
}
}
if ($errors) {
return FALSE;
}
return TRUE;
}