Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (20 sloc) 608 Bytes
class Thumbnailer extends CApplicationComponent
public $wideImagePath; // WideImage relative path from application base path
public $width;
public $height;
public function init()
include Yii::app()->basePath.DIRECTORY_SEPARATOR.
public function generate($imagePath, $thumbnailPath)
$image = WideImage::load($imagePath);
$resized = $image->resize($this->width, $this->height, 'outside');
$cropped = $resized->crop('center', 'center', $this->width, $this->height);
Something went wrong with that request. Please try again.