You are here

function image_imagemagick_crop in Image 7

Same name and namespace in other branches
  1. 5.2 image.imagemagick.inc \image_imagemagick_crop()
  2. 5 image.imagemagick.inc \image_imagemagick_crop()
  3. 6 image.imagemagick.inc \image_imagemagick_crop()

Crop an image to the specified dimensions.

File

./image.imagemagick.inc, line 116

Code

function image_imagemagick_crop($source, $dest, $x, $y, $width, $height) {
  $args = array(
    'crop' => '-crop ' . (int) $width . 'x' . (int) $height . '+' . (int) $x . '+' . (int) $y . '!',
  );
  $args = _image_imagemagick_alter_invoke('crop', $source, $args);
  return _image_imagemagick_convert($source, $dest, $args);
}