1: <?php
2: 3: 4: 5: 6: 7:
8: class Ansel_ImageGenerator_ShadowThumbStack extends Ansel_ImageGenerator
9: {
10: public $need = array('PhotoStack');
11:
12: 13: 14: 15:
16: protected function _create()
17: {
18: $imgobjs = $this->_getStackImages();
19: $style = $this->_params['style'];
20: $params = array('width' => 100,
21: 'height' => 100,
22: 'background' => $style->background);
23:
24: $baseImg = Ansel::getImageObject($params);
25: try {
26: $baseImg->addEffect(
27: 'PhotoStack',
28: array('images' => $imgobjs,
29: 'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
30: 'padding' => 0,
31: 'background' => $style->background,
32: 'type' => 'plain'));
33:
34: $baseImg->applyEffects();
35: $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
36: $GLOBALS['conf']['thumbnail']['height']);
37: } catch (Horde_Image_Exception $e) {
38: throw new Ansel_Exception($e);
39: }
40:
41: return $baseImg;
42: }
43:
44: }
45: