You are here

function imagecache_coloractions_image_effect_info in ImageCache Actions 8

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

Implements hook_image_effect_info().

Defines information about the supported effects.

File

coloractions/imagecache_coloractions.module, line 32

Code

function imagecache_coloractions_image_effect_info() {

  // @todo: standardize naming. requires a hook_update_n().
  $effects = array();
  $effects['coloractions_colorshift'] = array(
    'label' => t('Color Shift'),
    'help' => t('Adjust image colors.'),
    'effect callback' => 'coloractions_colorshift_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_colorshift_form',
    'summary theme' => 'coloractions_colorshift_summary',
  );
  $effects['imagecache_coloroverlay'] = array(
    'label' => t('Color Overlay'),
    'help' => t('Apply a color tint to an image (retaining blacks and whites).'),
    'effect callback' => 'coloractions_coloroverlay_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_coloroverlay_form',
    'summary theme' => 'coloractions_coloroverlay_summary',
  );
  $effects['coloractions_brightness'] = array(
    'label' => t('Brightness'),
    'help' => t('Adjust image brightness.'),
    'effect callback' => 'coloractions_brightness_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_brightness_form',
    'summary theme' => 'coloractions_brightness_summary',
  );

  // @todo: changing inverse to invert at this place requires a hook_update_n().
  $effects['coloractions_inverse'] = array(
    'label' => t('Negative Image'),
    'help' => t('Invert colors and brightness.'),
    'effect callback' => 'coloractions_invert_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_invert_form',
    'summary theme' => 'coloractions_invert_summary',
  );

  // @todo Convert may need a little more work.
  $effects['coloractions_convert'] = array(
    'label' => t('Change file format'),
    'help' => t('Choose to save the image as a different filetype.'),
    'effect callback' => 'coloractions_convert_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_convert_form',
    'summary theme' => 'coloractions_convert_summary',
  );
  $effects['coloractions_posterize'] = array(
    'label' => t('Posterize'),
    'help' => t('Reduce the image to a limited number of color levels per channel.'),
    'effect callback' => 'coloractions_posterize_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_posterize_form',
    'summary theme' => 'coloractions_posterize_summary',
  );
  $effects['imagecache_alpha'] = array(
    'label' => t('Alpha Transparency'),
    'help' => t('Adjust transparency.'),
    'effect callback' => 'coloractions_alpha_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_alpha_form',
    'summary theme' => 'coloractions_alpha_summary',
  );
  $effects['imagecache_adjustlevels'] = array(
    'label' => t('Adjust Levels'),
    'help' => t('Adjust the color levels of the image.'),
    'effect callback' => 'coloractions_adjustlevels_effect',
    'dimensions passthrough' => TRUE,
    'form callback' => 'coloractions_adjustlevels_form',
    'summary theme' => 'coloractions_adjustlevels_summary',
  );
  $effects['imagecache_desaturatealpha'] = array(
    'label' => t('Desaturate Alpha'),
    'help' => t('Desaturate the image while retaining transparency.'),
    'effect callback' => 'coloractions_desaturatealpha_effect',
    'dimensions passthrough' => TRUE,
    'summary theme' => 'coloractions_desaturatealpha_summary',
  );
  return $effects;
}