function image_scale_dimensions in Drupal 7
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.
1 string reference to 'image_scale_dimensions'
- image_image_effect_info in modules/
image/ image.effects.inc - Implements hook_image_effect_info().
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']);
}
}