1: <?php
2: /**
3: * Image effect easily creating small, center-cropped thumbnails.
4: *
5: * Copyright 2010-2012 Horde LLC (http://www.horde.org/)
6: *
7: * See the enclosed file COPYING for license information (LGPL). If you
8: * did not receive this file, see http://www.horde.org/licenses/lgpl21.
9: *
10: * @author Michael J. Rubinsky <mrubinsk@horde.org>
11: * @package Image
12: */
13: class Horde_Image_Effect_Imagick_CenterCrop extends Horde_Image_Effect
14: {
15: /**
16: * Valid parameters:
17: * <pre>
18: * width - Target width
19: * height - Target height
20: * </pre>
21: *
22: * @var array
23: */
24: protected $_params = array();
25:
26: public function apply()
27: {
28: $this->_params = new Horde_Support_Array($this->_params);
29: $this->_image->imagick->cropThumbnailImage($this->_params->width, $this->_params->height);
30: $this->_image->clearGeometry();
31:
32: return;
33: }
34:
35: }