function imagick_posterize_form in Imagick 7
Image effect form callback for the posterize effect.
Parameters
array $data: The current configuration for this image effect.
Return value
array The form definition for this effect.
1 string reference to 'imagick_posterize_form'
- imagick_image_effect_info in ./
imagick.module - Implements hook_image_effect_info()
File
- effects/
imagick.posterize.inc, line 39
Code
function imagick_posterize_form($data) {
$data = array_merge(imagick_posterize_defaults(), (array) $data);
$form['colors'] = array(
'#type' => 'textfield',
'#title' => t('Color levels per channel'),
'#default_value' => isset($data['colors']) ? $data['colors'] : '',
'#required' => TRUE,
'#size' => 10,
'#element_validate' => array(
'image_effect_integer_validate',
),
'#allow_negative' => FALSE,
'#description' => t('Number of unique values per color channel to reduce this image to. The transparency channel is left unchanged. This effect can be used to reduce file size on png images.'),
);
return $form;
}