You are here

function image_imagemagick_crop in Image 5.2

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

Crop an image to the specified dimensions.

File

./image.imagemagick.inc, line 115

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);
}