CodeIgniter Forums
image lib confuses me - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: image lib confuses me (/showthread.php?tid=7257)



image lib confuses me - El Forum - 04-01-2008

[eluser]richthegeek[/eluser]
Does anyone else find the image library confusing?

Why can't we just have stuff like this:

Code:
$this->load->libary("image");

...

$this->image('image.png')->rotate( "+45" )->saveTo( "assets/images/rotated/_SRC_" );

...
$img = $this->image('image.png');

$img->crop( fromX, toX, fromY, toY );
$img->resize( width, height, retainAspect ); // alternatively, if width=false or height=false, retain aspect automatically.

$img->output();

The current use of config etc is less useful to me than the imageGD stuff...