Merge pull request #6393 from webbuilders-group/imagick-crop-function

NEW: Added ImagickBackend::crop() for compatibility with GDBackend
This commit is contained in:
Daniel Hensby 2016-12-14 15:08:25 +00:00 committed by GitHub
commit 149d260be6

View File

@ -265,6 +265,21 @@ class ImagickBackend extends Imagick implements Image_Backend {
$new->ThumbnailImage($width,$height,true);
return $new;
}
/**
* Crop's part of image.
* @param int $top y position of left upper corner of crop rectangle
* @param int $left x position of left upper corner of crop rectangle
* @param int $width rectangle width
* @param int $height rectangle height
* @return Image_Backend
*/
public function crop($top, $left, $width, $height) {
$new = clone $this;
$new->cropImage($width, $height, $left, $top);
return $new;
}
/**
* @param Image $frontend