Example #1
0
 /**
  * @todo width / height / crop... do it the real way
  */
 public function generateTumbnail(array $dimension, $crop = false)
 {
     $dimension = array_merge(['width' => null, 'height' => null], $dimension);
     $original = $this->getOriginalFile()->getImage();
     $thumb = clone $original;
     $thumb = $thumb->widen($dimension['width']);
     $identifier = 'thumb-' . ($dimension['width'] ? $dimension['width'] : 'x') . '-' . ($dimension['height'] ? $dimension['height'] : 'x');
     File::make($this, $thumb, $identifier);
 }