This is a helper for creating and caching thumbnails. Based on PHPThumb, The benefit over the image component ported from kohana is that it allows more resizing methods (like adaptive resize.
protected/See the following code example, it defaults to adaptive resize:
echo Yii::app()->request->baseUrl.ImageHelper::thumb(600,800,$img, array('method' => 'resize'));
Default is:
echo Yii::app()->request->baseUrl.ImageHelper::thumb(600,800,$img, array('method' => 'adaptiveResize'));
You can use the 3rd parameter for all options of PHP Thumb look on github for the documentation.
github.com/masterexploder/PHPThumb/
Total 6 comments
thank you
Why when I load small image for example 15x15, it changed at at 600x600. How make small pictures haven't changed?
Works as advertised but the lack of options means the class needs to be modified directly.
Also, 'ExceptionClass' needs to be renamed to 'CException'.
Thanks, implemented!
Nice
Nice work!!
Leave a comment
Please login to leave your comment.