+++ /dev/null
-<?php
-/**
- * ImageView to create the mini view.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_mini extends Ansel_ImageView {
-
- function _create()
- {
- $this->_image->resize(min(50, $this->_dimensions['width']),
- min(50, $this->_dimensions['height']),
- true);
-
- return true;
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the gallery image stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_plainstack extends Ansel_ImageView {
-
- var $need = array('PhotoStack');
-
- function _create()
- {
- $imgobjs = $this->_getStackImages();
- $style = $this->_params['style'];
- $params = array('width' => 100,
- 'height' => 100,
- 'background' => $style['background']);
-
- $baseImg = Ansel::getImageObject($params);
- try {
- $baseImg->addEffect(
- 'PhotoStack',
- array('images' => $imgobjs,
- 'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
- 'padding' => 0,
- 'background' => $style['background'],
- 'type' => 'plain'));
-
- $baseImg->applyEffects();
- $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
- $GLOBALS['conf']['thumbnail']['height']);
- } catch (Horde_Image_Exception $e) {
- return false;
- }
-
- return $baseImg;
-
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the gallery polaroid stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_polaroidstack extends Ansel_ImageView {
-
- var $need = array('PhotoStack');
-
- function _create()
- {
- $imgobjs = $this->_getStackImages();
- $style = $this->_params['style'];
- $params = array('width' => 100,
- 'height' => 100,
- 'background' => $style['background']);
-
- $baseImg = Ansel::getImageObject($params);
- try {
- $baseImg->addEffect(
- 'PhotoStack',
- array('images' => $imgobjs,
- 'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
- 'padding' => 10,
- 'background' => $style['background'],
- 'type' => 'polaroid'));
- $baseImg->applyEffects();
- $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
- $GLOBALS['conf']['thumbnail']['height']);
-
- } catch (Horde_Image_Exception $e) {
- return false;
- }
-
- return $baseImg;
-
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the shadowsharpthumb view (sharp corners, shadowed)
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-
-class Ansel_ImageView_polaroidthumb extends Ansel_ImageView {
-
- var $need = array('PolaroidImage');
-
- function _create()
- {
- $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
- min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
- true);
-
- /* Don't bother with these effects for a custom gallery default image
- (which will have a negative gallery_id). */
- if ($this->_image->gallery > 0) {
- if (is_null($this->_style)) {
- $gal = $GLOBALS['ansel_storage']->getGallery($this->_image->gallery);
- $styleDef = $gal->getStyle();
- } else {
- $styleDef = Ansel::getStyleDefinition($this->_style);
- }
- try {
- $this->_image->addEffect('PolaroidImage',
- array('background' => $styleDef['background'],
- 'padding' => 5));
-
- $this->_image->applyEffects();
- } catch (Horde_Image_Exception $e) {
- return false;
- }
-
- return true;
- }
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the prettythumb view (rounded, shadowed thumbnails).
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_prettythumb extends Ansel_ImageView {
-
- var $need = array('RoundCorners', 'DropShadow');
-
- function _create()
- {
- $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
- min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
- true);
-
- /* Don't bother with these effects for a stack image
- * (which will have a negative gallery_id). */
- if ($this->_image->gallery > 0) {
- if (is_null($this->_style)) {
- $gal = $GLOBALS['ansel_storage']->getGallery($this->_image->gallery);
- $styleDef = $gal->getStyle();
- } else {
- $styleDef = Ansel::getStyleDefinition($this->_style);
- }
-
- try {
- /* Apply the effects - continue on error, but be sure to log */
- $this->_image->addEffect('RoundCorners', array('border' => 2,
- 'bordercolor' => '#333'));
-
- $this->_image->addEffect('DropShadow', array('background' => $styleDef['background'],
- 'padding' => 5,
- 'distance' => 5,
- 'fade' => 3));
- } catch (Horde_Image_Exception $e) {
- return false;
- }
- $this->_image->applyEffects();
-
- return true;
- }
- }
-
-}
+++ /dev/null
- <?php
-/**
- * ImageView to create the gallery image stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- *
- */
-class Ansel_ImageView_roundedstack extends Ansel_ImageView {
-
- var $need = array('PhotoStack');
-
- function _create()
- {
- $imgobjs = $this->_getStackImages();
- $style = $this->_params['style'];
- $params = array('width' => 100,
- 'height' => 100,
- 'background' => $style['background']);
-
- $baseImg = Ansel::getImageObject($params);
-
- try {
- $baseImg->addEffect(
- 'PhotoStack',
- array('images' => $imgobjs,
- 'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
- 'padding' => 0,
- 'background' => $style['background'],
- 'type' => 'rounded'));
-
- $baseImg->applyEffects();
- $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
- $GLOBALS['conf']['thumbnail']['height']);
- } catch (Horde_Image_Exception $e) {
- return false;
- }
-
- return $baseImg;
-
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the screen view - image sized for slideshow view.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_screen extends Ansel_ImageView {
-
- function _create()
- {
- $this->_image->resize(min($GLOBALS['conf']['screen']['width'], $this->_dimensions['width']),
- min($GLOBALS['conf']['screen']['height'], $this->_dimensions['height']),
- true);
-
- return true;
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the shadowsharpthumb view (sharp corners, shadowed)
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_shadowsharpthumb extends Ansel_ImageView {
-
- var $need = array('DropShadow');
-
- function _create()
- {
- $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
- min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
- true);
-
- /* Don't bother with these effects for a stack image
- * (which will have a negative gallery_id). */
- if ($this->_image->gallery > 0) {
- if (is_null($this->_style)) {
- $gal = $GLOBALS['ansel_storage']->getGallery($this->_image->gallery);
- $styleDef = $gal->getStyle();
- } else {
- $styleDef = Ansel::getStyleDefinition($this->_style);
- }
-
- try {
- $this->_image->addEffect('border', array('bordercolor' => '#333'));
- $this->_image->addEffect('DropShadow',
- array('background' => $styleDef['background'],
- 'padding' => 5,
- 'distance' => '8',
- 'fade' => 2));
- $this->_image->applyEffects();
- } catch (Horde_Image_Exception $e) {
- return false;
- }
-
- return true;
- }
- }
-
-}
+++ /dev/null
-<?php
-/**
- * ImageView to create the thumb view (plain, resized thumbnails).
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageView_thumb extends Ansel_ImageView {
-
- function _create()
- {
- $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
- min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
- true);
- return true;
- }
-
-}