/** * 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; }
/** * {@inheritdoc} */ public function manipulate(AbstractImage $image, $width, $height) { $this->box->setHeight($height)->setWidth($width); return $image->resize($this->box); }
/** * {@inheritdoc} */ public function manipulate(AbstractImage $image, $width, $height) { return $image->resize(new Box($width, $height)); }