ewideimage

An repackaged version of WideImage
9 followers

Warning: This is an Alpha version!

Before you try this extension, know that the original works fine out of the box.

EWideImage is simply a version of WideImage slightly modified to work more closely with Yii, at this time the only change is the autoloading of classes instead of include calls. I'm in the process of adding better exception handling and wrapping the exceptions thrown in this project in Yii exceptions.

ALL CREDIT GOES TO THE CREATORS OF WideImage (WideImage)

Requirements

  • PHP 5.2+
  • GD2 extension

Usage

Install under your extensions directory, needs to be in a EWideImage sub-directory.

Yii::import('application.extensions.EWideImage.WideImage');
 
or 
 
'import' => array(
  'application.models.*',
  'application.components.*',
  'application.helpers.*',
  //extensions
  'application.extensions.EWideImage.WideImage', //WideImage
),

The use it:

WideImage::load('big.png')->resize(50, 30)->saveToFile('small.jpg');
WideImage::load('pic.jpg')->crop('center', 'center', 90, 50)->output('png');

Resources

WideImage Project Home

Total 1 comment

#5671 report it
yiqing95 at 2011/10/31 11:41am
seems should keep it is , no need to wrapper it

actually i v used it in yii some times ago! just copy the wideimage dir to protected/vendors dir. then :

Yii::import('application.vendors.wideImage.lib.WideImage');
WideImage::load('big.png')->resize(50, 30)->saveToFile('small.jpg');
..

you do to many useless things ! :)

Leave a comment

Please to leave your comment.

Create extension