/** * Constructor. * * @see Horde_Image_Base::_construct */ public function __construct($params, $context = array()) { parent::__construct($params, $context); $this->_svg = new XML_SVG_Document(array('width' => $this->_width, 'height' => $this->_height)); if ($this->_background != 'none') { $this->rectangle(0, 0, $this->_width, $this->_height, $this->_background, $this->_background); } }
/** */ public function __construct($params, $context = array()) { parent::__construct($params, $context); if (!empty($params['filename'])) { $this->loadFile($params['filename']); } elseif (!empty($params['data'])) { $this->loadString($params['data']); } }
function Horde_Image_swf($params) { parent::Horde_Image($params); $this->_movie = new SWFMovie(); $this->_movie->setDimension($this->_width, $this->_height); // FIXME: honor the 'background' parameter here. $this->_movie->setBackground(0xff, 0xff, 0xff); $this->_movie->setRate(30); }
/** * Constructor. * * @see Horde_Image_Base::_construct */ public function __construct($params, $context = array()) { parent::__construct($params, $context); $this->_movie = new SWFMovie(); $this->_movie->setDimension($this->_width, $this->_height); $color = Horde_Image::getRGB($this->_background); $this->_movie->setBackground($color[0], $color[1], $color[2]); $this->_movie->setRate(30); }
/** * Resets the image data. */ public function reset() { parent::reset(); $this->_operations = array(); $this->_postSrcOperations = array(); $this->clearGeometry(); }
/** * Build an Ansel_Image from a given Horde_Image. * Used to wrap iterating the Horde_Image * * @param Horde_Image_Base $image The Horde_Image * * @return Ansel_Image */ protected function _buildImageObject(Horde_Image_Base $image) { $params = array('image_filename' => $this->filename, 'data' => $image->raw()); $newImage = new Ansel_Image($params); return $newImage; }
/** * Resets the image data to defaults. */ public function reset() { parent::reset(); $this->_img = array(); }
public function reset() { parent::reset(); $this->_imagick->clear(); $this->_noMoreImages = false; }
/** * Load the image data from a file. * * @param string $filename The full path and filename to the file to load * the image data from. The filename will also be * used for the image id. * * @return boolean * @throws Horde_Image_Exception */ public function loadFile($filename) { $info = $this->call('getimagesize', array($filename)); if (is_array($info)) { switch ($info[2]) { case 1: if (function_exists('imagecreatefromgif')) { $this->_im = $this->call('imagecreatefromgif', array($filename)); } break; case 2: $this->_im = $this->call('imagecreatefromjpeg', array($filename)); break; case 3: $this->_im = $this->call('imagecreatefrompng', array($filename)); break; case 15: if (function_exists('imagecreatefromgwbmp')) { $this->_im = $this->call('imagecreatefromgwbmp', array($filename)); } break; case 16: $this->_im = $this->call('imagecreatefromxbm', array($filename)); break; } } if (is_resource($this->_im)) { return true; } $result = parent::loadFile($filename); $this->_im = $this->call('imageCreateFromString', array($this->_data)); }
/** * Loads the image data from a file. * * @param string $filename The full path and filename to the file to load * the image data from. */ public function loadFile($filename) { $info = $this->call('getimagesize', array($filename)); if (is_array($info)) { switch ($info[2]) { case IMAGETYPE_GIF: if (function_exists('imagecreatefromgif')) { $this->_im = $this->call('imagecreatefromgif', array($filename)); } break; case IMAGETYPE_JPEG: $this->_im = $this->call('imagecreatefromjpeg', array($filename)); break; case IMAGETYPE_PNG: $this->_im = $this->call('imagecreatefrompng', array($filename)); break; case IMAGETYPE_WBMP: if (function_exists('imagecreatefromgwbmp')) { $this->_im = $this->call('imagecreatefromgwbmp', array($filename)); } break; case IMAGETYPE_XBM: $this->_im = $this->call('imagecreatefromxbm', array($filename)); break; } } if (is_resource($this->_im)) { return; } parent::loadFile($filename); $this->_im = $this->call('imageCreateFromString', array($this->_data)); }
public function __construct($params) { parent::__construct($params); $this->_svg = new XML_SVG_Document(array('width' => $this->_width, 'height' => $this->_height)); }