[extension] Image


is it possible to generate image on fly, without save on disk?


See http://de2.php.net/m…n/ref.image.php and http://de2.php.net/m…xamples-png.php .


maybe author image extension could add this feature?

sorry qwerty

Will not add this feature

this extension only Kohana Image Library wrapper

Kohana Image Library could not generate image on fly


changes in Image class to cut images into square from a rectangular image without distortion

Added new constant SQUARE

Modified ‘resize’ method to check the value of SQUARE and define if $master will determine WIDTH or HEIGHT

to cut images square

$thumb = Yii::app()->image->load('your_image.png');                                            

$thumb->resize(120, 120, Image::SQUARE)->crop(120,120)->sharpen(15)->quality(75);




works very nice! Thank you.

I just modified the files a little bit:

Yii::setPathOfAlias('image', dirname(__FILE__));


instead of the full path, in Image and CImageComponent.

Because I use it as a extension in a module.

Best regards,


There is a bug with transparent gif resizing - background becomes black.

Here is fixed 435


I have another problem which seems really bad.

Lets say I have an Image with 400k size, here is my code.

public function actionPrueba(){

		$imgh = Yii::app()->image;

		$img = $imgh->load("C:/test/images/30225.jpg");



then if I right click the image and save it locally, the new size its 712k.

I dont know why is i getting bigger, any help? Im really worried cause its affecting my site’s preformance really bad.