You are here

function coloractions_posterize_form in ImageCache Actions 8

Same name and namespace in other branches
  1. 7 coloractions/imagecache_coloractions.module \coloractions_posterize_form()

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 'coloractions_posterize_form'
imagecache_coloractions_image_effect_info in coloractions/imagecache_coloractions.module
Implements hook_image_effect_info().

File

coloractions/imagecache_coloractions.module, line 716

Code

function coloractions_posterize_form(array $data) {
  $form = array();
  $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;
}