2nd try
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 17 Feb 2010 01:05:20 +0000 (20:05 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 17 Feb 2010 01:05:20 +0000 (20:05 -0500)
ansel/lib/ImageView/mini.php [deleted file]
ansel/lib/ImageView/plainstack.php [deleted file]
ansel/lib/ImageView/polaroidstack.php [deleted file]
ansel/lib/ImageView/polaroidthumb.php [deleted file]
ansel/lib/ImageView/prettythumb.php [deleted file]
ansel/lib/ImageView/roundedstack.php [deleted file]
ansel/lib/ImageView/screen.php [deleted file]
ansel/lib/ImageView/shadowsharpthumb.php [deleted file]
ansel/lib/ImageView/thumb.php [deleted file]

diff --git a/ansel/lib/ImageView/mini.php b/ansel/lib/ImageView/mini.php
deleted file mode 100755 (executable)
index 8b9f141..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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;
-    }
-
-}
diff --git a/ansel/lib/ImageView/plainstack.php b/ansel/lib/ImageView/plainstack.php
deleted file mode 100644 (file)
index ad19bde..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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;
-
-    }
-
-}
diff --git a/ansel/lib/ImageView/polaroidstack.php b/ansel/lib/ImageView/polaroidstack.php
deleted file mode 100644 (file)
index a712931..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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;
-
-    }
-
-}
diff --git a/ansel/lib/ImageView/polaroidthumb.php b/ansel/lib/ImageView/polaroidthumb.php
deleted file mode 100644 (file)
index 90fe119..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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;
-        }
-    }
-
-}
diff --git a/ansel/lib/ImageView/prettythumb.php b/ansel/lib/ImageView/prettythumb.php
deleted file mode 100644 (file)
index 4c5b86f..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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;
-        }
-    }
-
-}
diff --git a/ansel/lib/ImageView/roundedstack.php b/ansel/lib/ImageView/roundedstack.php
deleted file mode 100644 (file)
index 92a0a61..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
- <?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;
-
-    }
-
-}
diff --git a/ansel/lib/ImageView/screen.php b/ansel/lib/ImageView/screen.php
deleted file mode 100755 (executable)
index 4d912ed..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?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;
-    }
-
-}
diff --git a/ansel/lib/ImageView/shadowsharpthumb.php b/ansel/lib/ImageView/shadowsharpthumb.php
deleted file mode 100644 (file)
index 305788d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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;
-        }
-    }
-
-}
diff --git a/ansel/lib/ImageView/thumb.php b/ansel/lib/ImageView/thumb.php
deleted file mode 100755 (executable)
index cf769c2..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?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;
-    }
-
-}