Example #1
0
 public function resize($width, $height)
 {
     parent::resize($width, $height);
     $this->_imagick->scaleimage($width, $height);
 }
Example #2
0
 /**
  * Resize image into specified width and height
  *
  * @throws Zend_Image_Driver_Exception
  * @param int $width Width to resize
  * @param int $height Height to resize
  * @return bool
  */
 public function resize($width, $height)
 {
     parent::resize($width, $height);
     $imageSize = $this->getSize();
     $resizedImage = imagecreatetruecolor($width, $height);
     if ($this->_type == "png") {
         imagealphablending($resizedImage, true);
     }
     $successfull = imagecopyresized($resizedImage, $this->_image, 0, 0, 0, 0, $width, $height, $imageSize[0], $imageSize[1]);
     unset($this->_image);
     $this->_image = $resizedImage;
     return $successfull;
 }
Example #3
0
 /**
  * Resize image into specified width and height
  *
  * @throws Zend_Image_Driver_Exception
  * @param int $width Width to resize
  * @param int $height Height to resize
  * @return bool
  */
 public function resize($width, $height)
 {
     parent::resize($width, $height);
     $imageSize = $this->getSize();
     $resizedImage = imagecreatetruecolor($width, $height);
     $successfull = imagecopyresized($resizedImage, $this->_image, 0, 0, 0, 0, $width, $height, $imageSize[0], $imageSize[1]);
     unset($this->_image);
     $this->_image = $resizedImage;
     return $successfull;
 }