function image_image_effect_info
image_image_effect_info()
Implements hook_image_effect_info().
File
- modules/image/image.effects.inc, line 11
- Functions needed to execute image effects provided by Image module.
Code
function image_image_effect_info() { $effects = array( 'image_resize' => array( 'label' => t('Resize'), 'help' => t('Resizing will make images an exact set of dimensions. This may cause images to be stretched or shrunk disproportionately.'), 'effect callback' => 'image_resize_effect', 'dimensions callback' => 'image_resize_dimensions', 'form callback' => 'image_resize_form', 'summary theme' => 'image_resize_summary', ), 'image_scale' => array( 'label' => t('Scale'), 'help' => t('Scaling will maintain the aspect-ratio of the original image. If only a single dimension is specified, the other dimension will be calculated.'), 'effect callback' => 'image_scale_effect', 'dimensions callback' => 'image_scale_dimensions', 'form callback' => 'image_scale_form', 'summary theme' => 'image_scale_summary', ), 'image_scale_and_crop' => array( 'label' => t('Scale and crop'), 'help' => t('Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.'), 'effect callback' => 'image_scale_and_crop_effect', 'dimensions callback' => 'image_resize_dimensions', 'form callback' => 'image_resize_form', 'summary theme' => 'image_resize_summary', ), 'image_crop' => array( 'label' => t('Crop'), 'help' => t('Cropping will remove portions of an image to make it the specified dimensions.'), 'effect callback' => 'image_crop_effect', 'dimensions callback' => 'image_resize_dimensions', 'form callback' => 'image_crop_form', 'summary theme' => 'image_crop_summary', ), 'image_desaturate' => array( 'label' => t('Desaturate'), 'help' => t('Desaturate converts an image to grayscale.'), 'effect callback' => 'image_desaturate_effect', 'dimensions passthrough' => TRUE, ), 'image_rotate' => array( 'label' => t('Rotate'), 'help' => t('Rotating an image may cause the dimensions of an image to increase to fit the diagonal.'), 'effect callback' => 'image_rotate_effect', 'dimensions callback' => 'image_rotate_dimensions', 'form callback' => 'image_rotate_form', 'summary theme' => 'image_rotate_summary', ), ); return $effects; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!image!image.effects.inc/function/image_image_effect_info/7.x