/**
  * Wrapper for Imagines resize
  *
  * @param array Array of options for processing the image
  * @throws \InvalidArgumentException
  * @return $this
  */
 public function resize(array $options = [])
 {
     if (empty($options['height']) || empty($options['width'])) {
         throw new \InvalidArgumentException(__d('imagine', 'You have to pass height and width in the options!'));
     }
     $this->_image->resize(new Box($options['width'], $options['height']));
     return $this;
 }
示例#2
0
文件: Scale.php 项目: todstoychev/icr
 /**
  * {@inheritdoc}
  */
 public function manipulate(AbstractImage $image, $width, $height)
 {
     $this->box->setHeight($height)->setWidth($width);
     return $image->resize($this->box);
 }
示例#3
0
 /**
  * {@inheritdoc}
  */
 public function manipulate(AbstractImage $image, $width, $height)
 {
     return $image->resize(new Box($width, $height));
 }