function image_example_image_effect_info

Implements hook_image_effect_info().

This hook allows your module to define additional image manipulation effects that can be used with image styles.

Related topics

File

image_example/image_example.module, line 228

Code

function image_example_image_effect_info() {
    $effects = array();
    // The array is keyed on the machine-readable effect name.
    $effects['image_example_colorize'] = array(
        // Human readable name of the effect.
'label' => t('Colorize'),
        // (optional) Brief description of the effect that will be shown when
        // adding or configuring this image effect.
'help' => t('The colorize effect will first remove all color from the source image and then tint the image using the color specified.'),
        // Name of function called to perform this effect.
'effect callback' => 'image_example_colorize_effect',
        // (optional) Name of function that provides a $form array with options for
        // configuring the effect. Note that you only need to return the fields
        // specific to your module. Submit buttons will be added automatically, and
        // configuration options will be serailized and added to the 'data' element
        // of the effect. The function will recieve the $effect['data'] array as
        // its only parameter.
'form callback' => 'image_example_colorize_form',
        // (optional) Name of a theme function that will output a summary of this
        // effects configuation. Used when displaying list of effects associated
        // with an image style. In this example the function
        // theme_image_example_colorize_summary will be called via the theme()
        // function. Your module must also implement hook_theme() in order for this
        // function to work correctly. See image_example_theme() and
        // theme_image_example_colorize_summary().
'summary theme' => 'image_example_colorize_summary',
    );
    return $effects;
}