You are here

function imageapi_imagemagick_image_crop in ImageAPI 5

Same name and namespace in other branches
  1. 6 imageapi_imagemagick.module \imageapi_imagemagick_image_crop()

File

./imageapi_imagemagick.module, line 107
ImageMagick toolkit functions

Code

function imageapi_imagemagick_image_crop(&$image, $x, $y, $width, $height) {
  $image->ops[] = '-crop ' . (int) $width . 'x' . (int) $height . '+' . (int) $x . '+' . (int) $y . '!';
  $image->info['width'] = $width;
  $image->info['height'] = $height;
  return TRUE;
}