imagick.modulate.inc in Imagick 7
File
effects/imagick.modulate.inc
View source
<?php
function image_imagick_modulate(stdClass $image, $brightness, $saturation, $hue) {
return $image->resource
->modulateImage($brightness, $saturation, $hue);
}
function imagick_modulate($image, $data = array()) {
image_toolkit_invoke('modulate', $image, $data);
}
function imagick_modulate_form($data) {
$data = array_merge(imagick_modulate_defaults(), (array) $data);
$form['brightness'] = array(
'#type' => 'textfield',
'#title' => t('Brightness in percentage'),
'#default_value' => $data['brightness'],
'#size' => 3,
);
$form['saturation'] = array(
'#type' => 'textfield',
'#title' => t('Saturation in percentage'),
'#default_value' => $data['saturation'],
'#size' => 3,
);
$form['hue'] = array(
'#type' => 'textfield',
'#title' => t('Hue in percentage'),
'#default_value' => $data['hue'],
'#size' => 3,
);
return $form;
}
function imagick_modulate_defaults() {
return array(
'brightness' => 150,
'saturation' => 150,
'hue' => 150,
);
}