function image_scale_dimensions
image_scale_dimensions(array &$dimensions, array $data)
Image dimensions callback; Scale.
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 scale effect with the following items:
- "width": An integer representing the desired width in pixels.
- "height": An integer representing the desired height in pixels.
- "upscale": A boolean indicating that the image should be upscaled if the dimensions are larger than the original image.
File
- modules/image/image.effects.inc, line 153
- Functions needed to execute image effects provided by Image module.
Code
function image_scale_dimensions(array &$dimensions, array $data) { if ($dimensions['width'] && $dimensions['height']) { image_dimensions_scale($dimensions, $data['width'], $data['height'], $data['upscale']); } }
© 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_scale_dimensions/7.x