Newscoop\Image\Rendition::getPreview PHP Метод

getPreview() публичный Метод

Get preview
public getPreview ( integer $width, integer $height ) : Newscoop\Image\Rendition
$width integer
$height integer
Результат Newscoop\Image\Rendition
    public function getPreview($width, $height)
    {
        list($width, $height) = \Newscoop\Image\ImageService::calculateSize($this->width, $this->height, $width, $height);
        return new Rendition($width, $height, $this->getSpecs());
    }

Usage Example

Пример #1
0
 /**
  * Get rendition preview
  *
  * @param Newscoop\Image\Rendition $rendition
  * @param int $width
  * @param int $height
  * @param Newscoop\Image\ImageInterface $image
  * @return string
  */
 public function renditionPreview(\Newscoop\Image\Rendition $rendition, $width, $height, \Newscoop\Image\ImageInterface $image)
 {
     $this->view->rendition = $rendition;
     $this->view->preview = $rendition->getPreview($width, $height);
     $this->view->thumbnail = $this->view->preview->getThumbnail($image, Zend_Registry::get('container')->getService('image'));
     $this->view->image = $image;
     return $this->view->render('rendition/preview.phtml');
 }
All Usage Examples Of Newscoop\Image\Rendition::getPreview