[eluser]Unknown[/eluser]
I want to resize Original image twice in a one function.
I have used following function, but it is not work
$config['upload_path'] = './journal_photos/';
$config['allowed_types'] = 'gif|jpg|png|bmp';
$config['max_size'] = '';
$config['max_width'] = '';
$config['max_height'] = '';
$this->load->library('upload',$config);
$this->upload->do_upload();
$temp=$this->upload->data();
if($temp['file_name'] != NULL)
{
$config['image_library'] = 'GD2';
$config['source_image'] = './journal_photos/'.$temp['file_name'];
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 100;
$config['height'] = 75;
$this->load->library('image_lib', $config);
$first = $this->image_lib->resize();
$config1['image_library'] = 'GD2';
$config1['source_image'] = './journal_photos/'.$temp['file_name'];
$config1['create_thumb'] = FALSE;
$config1['new_image'] = './journal_photos/new.jpeg';
$config1['maintain_ratio'] = TRUE;
$config1['width'] = 60;
$config1['height'] = 40;
$this->load->library('image_lib', $config1);
$second = $this->image_lib->resize();
if (! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}
}//if
Please suggest solution.