function retina_images_image_crop_effect in Retina Images 7
Image effect callback; Crop an image resource.
Parameters
$image: An image object returned by image_load().
$data: An array of attributes to use when performing the crop effect with the following items:
- "width": An integer representing the desired width in pixels.
 - "height": An integer representing the desired height in pixels.
 - "anchor": A string describing where the crop should originate in the form of "XOFFSET-YOFFSET". XOFFSET is either a number of pixels or "left", "center", "right" and YOFFSET is either a number of pixels or "top", "center", "bottom".
 
Return value
TRUE on success. FALSE on failure to crop image.
See also
1 string reference to 'retina_images_image_crop_effect'
- retina_images_image_effect_info_alter in ./
retina_images.module  - Implements hook_image_effect_info_alter
 
File
- ./
retina_images.module, line 241  - This module provides an image effect to assist in outputing high resolution images.
 
Code
function retina_images_image_crop_effect(&$image, $data) {
  // Set sane default values.
  $data += array(
    'anchor' => 'center-center',
  );
  retina_images_multiply_data_dimensions($data);
  return image_crop_effect($image, $data);
}