image_resize_dimensions
function image_resize_dimensions
image_resize_dimensions(array &$dimensions, array $data)
Image dimensions callback; Resize.
Parameters
$dimensions: Dimensions to be modified - an array with components width and height, in pixels.
$data: An array of attributes to use when performing the resize effect with the following items:
- "width": An integer representing the desired width in pixels.
- "height": An integer representing the desired height in pixels.
File
- modules/image/image.effects.inc, line 100
- Functions needed to execute image effects provided by Image module.
Code
function image_resize_dimensions(array &$dimensions, array $data) { // The new image will have the exact dimensions defined for the effect. $dimensions['width'] = $data['width']; $dimensions['height'] = $data['height']; }
© 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_resize_dimensions/7.x