function filtersie_generic_effect in FiltersIE 7
Image effect callback; Apply a convolution to an image resource.
Parameters
type $image: An image object returned by image_load().
type $data: An array of attributes to use when performing the sharpen effect with the following items:
- "matrix": A matrix loaded of float values.
- "divisor": A float.
Return value
type TRUE on success. FALSE on failure to make the convolution.
See also
1 string reference to 'filtersie_generic_effect'
- filtersie_image_effect_info in ./
filtersie.module - Implements hook_image_effect_info.
File
- ./
filtersie.module, line 87 - Filters Image Effect (filtersie)
Code
function filtersie_generic_effect(&$image, $data) {
$matrix = $data['matrix']['entries'];
$divisor = $data['divisor'];
$offset = $data['offset'];
if (!filtersie_generic($image, $matrix, $divisor, $offset)) {
watchdog('filtersie', 'Filters Image Effects generic failed using the %toolkit toolkit on %path (%mimetype, %dimensions)', array(
'%toolkit' => $image->toolkit,
'%path' => $image->source,
'%mimetype' => $image->info['mime_type'],
'%dimensions' => $image->info['height'] . 'x' . $image->info['height'],
), WATCHDOG_ERROR);
return FALSE;
}
return TRUE;
}