You are here

function coloractions_brightness_form in ImageCache Actions 8

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

Image effect form callback for the brightness 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_brightness_form'
imagecache_coloractions_image_effect_info in coloractions/imagecache_coloractions.module
Implements hook_image_effect_info().

File

coloractions/imagecache_coloractions.module, line 424

Code

function coloractions_brightness_form(array $data) {
  $default = array(
    'filter_arg1' => '100',
  );
  $data = array_merge($default, (array) $data);
  $form = array();
  $form['help'] = array(
    '#value' => t("The brightness effect seldom looks good on its own, but can be useful to wash out an image before making it transparent - eg for a watermark."),
  );
  $form['filter_arg1'] = array(
    '#type' => 'textfield',
    '#title' => t('Brightness'),
    '#description' => t('-255 - +255'),
    '#default_value' => $data['filter_arg1'],
    '#size' => 3,
  );
  return $form;
}