[eluser]Martin_boatshop24[/eluser]
Yeah can do. Just a brief description all its meant to do it resize and output the image requested. Universe is library that contains a list of vars
Code:
class Images extends Controller {
var $fullPath;
function Images() {
parent::Controller();
$this->fullPath = $this->universe->site['resource_folder'] . "/" . $this->universe->site['clientImg_folder'] . "/";
}
function fetch( $for , $image ) {
error_log("FOR ::: " . $for . " IMAGE ::: " . $image );
switch ( $for ) {
case "upload" :
$resizerSettings = $this->config->item("thumbnail_resizer");
$resizerSettings['source_image'] = $this->fullPath . str_ireplace("_" , "/" , $image);
break;
}
error_log( $resizerSettings['source_image'] );
$this->load->library('image_lib' , $resizerSettings );
$this->image_lib->resize();
}
}