Example #1
0
 /**
  * Get the thumb component
  *
  * @param string $file filename
  * @return \Simplify\Thumb
  */
 protected function getThumbComponent($file)
 {
     return \Simplify\Thumb::factory()->load($file);
 }
Example #2
0
 /**
  * Get the url for a zoom cropped version of the imagem
  *
  * @param string $file
  * @param int $width
  * @param int $height
  * @return string
  */
 protected function getThumbUrl($file, $width, $height)
 {
     try {
         return \Simplify::config()->get('www:url') . \Simplify\Thumb::factory()->load($file)->zoomCrop($width, $height)->cache()->getCacheFilename();
     } catch (\Simplify\ThumbException $e) {
         //
     }
 }