Idol Web Image module for adaptive image resizing and caching in database, based on Kohana Image module.
Next methods are available:
1.Place 'iwi' folder into 'protected/extensions/'
2.Configuration (protected/config/main.php):
'iwi' => array( 'class' => 'application.extensions.iwi.IwiComponent', // GD or ImageMagick 'driver' => 'GD', // ImageMagick setup path //'params'=>array('directory'=>'C:/ImageMagick'), ),
// loading Yii::import('ext.iwi.Iwi'); $picture = new Iwi('images/sample.jpg'); $picture->resize(100,100, Iwi::NONE); echo $picture->cache(); // chainable usage in template echo Yii::app()->iwi->load("images/totem.png")->adaptive(250,120)->cache();
$this->widget("ext.iwi.Resize");
Widget Resize is now derpecated.
Use adaptive() method now.
adaptive() combination of resize & crop, helps to making thumbnail.Version 1.1 release
New api
ImageMagick support
There is no need to perform a dump, it is performed automatically
SQLite database support
Release of 1.0 version
Find us on GitHub : https://github.com/Idol-IT/iwi
For more info or advanced functions contact us : http://idol-it.com/
Total 5 comments
Oh! Now I see it, thank you!
But such error is issued if image exists but corrupted, to prevent it I replace throwing
CExceptiontoreturn $this:Yes, it was fixed in last version(iwi-1.1.6.zip) see changelog. You can see here diff Diff
When image is not exists Fatal error issued: Fatal error: Call to a member function cache() on a non-object in \protected\views\model\view.php on line 216
Is any possibility to prevent that, because I work with images catalog that can consist corrupted images?
Once more improvement. By default
storagetable creating in db withouttablePrefix. To fix that iniwi/models/Storage.phpchange:To:
In
iwi/Iwi.phpfrom:To:
First of all thank you very much for this great module!
Method
apaptive()have useful parameter$upscaleBut I also need resize image without cropping and upscaling. To achieve this I and once more parameter to make
apaptive()more flexible:Leave a comment
Please login to leave your comment.