You are here

function imagecache_sharpen_form in ImageCache 5.2

Same name and namespace in other branches
  1. 6.2 imagecache_actions.inc \imagecache_sharpen_form()

Imagecache Sharpen

File

./imagecache_actions.inc, line 285

Code

function imagecache_sharpen_form($data) {
  $form['info'] = array(
    '#value' => t('<strong>NOTE:</strong> The sigma parameter below is currently <em>only</em> used when the Imagemagick toolkit is active.'),
  );
  $form['radius'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['radius']) ? $data['radius'] : '0.5',
    '#title' => t('Radius'),
    '#description' => t('The radius of the gaussian, in pixels, not counting the center pixel. If you\'re using Imagemagick, you can set this to 0 to let Imagemagick select a suitable radius. Typically 0.5 to 1 for screen resolutions. (default 0.5)'),
  );
  $form['sigma'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['sigma']) ? $data['sigma'] : '0.5',
    '#title' => t('Sigma'),
    '#description' => t('The standard deviation of the gaussian, in pixels. General rule of thumb: if radius < 1 then sigma = radius, else sigma = sqrt(radius). (default 0.5)'),
  );
  $form['amount'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['amount']) ? $data['amount'] : '100',
    '#title' => t('Amount'),
    '#description' => t('The percentage of the difference between the original and the blur image that is added back into the original. Typically 50 to 200. (default 100).'),
  );
  $form['threshold'] = array(
    '#type' => 'textfield',
    '#default_value' => isset($data['threshold']) ? $data['threshold'] : '0.05',
    '#title' => t('Threshold'),
    '#description' => t('The threshold, as a fraction of max RGB levels, needed to apply the difference amount.  Typically 0 to 0.2. (default 0.05).'),
  );
  return $form;
}