Skip to content

yiiext/image-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ImageComponent

Image processing with Imagine.

Installation and configuration

Install Imagine via composer.

Copy component to extensions/image-component directory located inside your application and add it to the application configuration the following way:

<?php
return array(
...
	'components'=>array(
		...
		'image'=>array(
			'class'=>'ext.image-component.ImageComponent',
			'driver'=>'Gd',
		),
		...
	),
...
);

Usage example

<?php
$image=Yii::app()->image->open('example.png');
$thumbnail=$image->thumbnail(new Imagine\Image\Box(100,100));
$thumbnail->save('example.thumb.png');