[eluser]karloff[/eluser]
I have been battling at getting the resize function working. At the moment, the resize does not work unless create_thumb is set to true... can anyone spot anything I'm doing wrong??
Code:
$config['image_library'] = 'gd2';
$config['create_thumb'] = FALSE;
$config['maintain_ratio'] = TRUE;
$config['overwrite'] = TRUE;
$config['quality'] = 100;
$config['width'] = 478;
$config['master_dim'] = 'width';
$config['source_image'] = './images/projects/'.$_FILES['image']['name'];
$this->load->library('image_lib', $config);
$this->image_lib->initialize($config);
if ( ! $this->image_lib->resize() )
{
$data['error'] = $this->image_lib->display_errors();
$this->template->load('admin_template', '/backend/add_work', $data);
}