/** * Function which called before render. * * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure. * @access protected */ function preRender() { $res = Image_Tools::createImage($this->options['image']); if (PEAR::isError($res)) { return $res; } $this->resultImage = $res; $this->_iWidth = imagesx($this->resultImage); $this->_iHeight = imagesy($this->resultImage); return true; }
/** * Function which called before render. * * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure. * @access protected * @see Image_Tools::createImage() */ function preRender() { // Create the source image $res = Image_Tools::createImage($this->options['image']); if (PEAR::isError($res)) { return $res; } $this->resultImage = $res; $this->_init(); }
/** * Function which called before render. * * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure. * @access protected * @see Image_Tools::createImage() */ function preRender() { $res = Image_Tools::createImage($this->options['image1']); if (PEAR::isError($res)) { return $res; } $this->_image1 = $res; $res = Image_Tools::createImage($this->options['image2']); if (PEAR::isError($res)) { return $res; } $this->_image2 = $res; // initialize an array if only its interpolation mode if ($this->options['mode'] == 'interpolation') { for ($i = 0; $i < 256; $i++) { $this->cosineTab[] = (int) round(64 - cos($i * M_PI / 255) * 64); } } return true; }
/** * Function which called before render. * * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure. * @access protected * @see Image_Tools::createImage() */ function preRender() { $res = Image_Tools::createImage($this->options['mask']); if (PEAR::isError($res)) { return $res; } $this->_maskImage = $res; $res = Image_Tools::createImage($this->options['sample']); if (PEAR::isError($res)) { return $res; } $this->_sampleImage = $res; $res = Image_Tools::createImage($this->options['image']); if (PEAR::isError($res)) { return $res; } $this->resultImage = $res; return true; }
/** * Function which called before render. * * @return bool|PEAR_Error TRUE on success or PEAR_Error on failure. * @access protected * @see Image_Tools::createImage() */ function preRender() { // Create the source image $source = Image_Tools::createImage($this->options['image']); if (PEAR::isError($source)) { return $source; } $this->_source = $source; // Create the mark image $mark = Image_Tools::createImage($this->options['mark']); if (PEAR::isError($mark)) { return $mark; } $this->_mark = $mark; // includes the Image_Tools_Blend if blend mode enable if ($this->options['blend'] != 'none') { require_once 'Image/Tools/Blend.php'; } }