Image dimensions callback; Resize.
$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:
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'];
}