You are here

function image_max_size_crop_dimensions in Image max size crop 7

Image dimensions callback; Resize.

Parameters

array $dimensions: Dimensions to be modified - an array with components width and height, in pixels.

array $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.
1 string reference to 'image_max_size_crop_dimensions'
image_max_size_crop_image_effect_info in ./image_max_size_crop.module
Implements hook_image_effect_info().

File

./image_max_size_crop.module, line 121
Functions needed to create an image style.

Code

function image_max_size_crop_dimensions(array &$dimensions, array $data) {
  if ($dimensions['width'] && $dimensions['height']) {
    image_dimensions_max_size_crop($dimensions, $data['width'], $data['height']);
  }
}