[eluser]BrianDHall[/eluser]
Well, two things - the path isn't right, and it doesn't seem your server supports the GD function which is the PHP extension module that handles image resizing - so you have two issues going on.
The first change is try using existing path data for your resize function as provided by the image upload class, as such:
Code:
function do_upload
{
$num=7; //for user_id
$config['upload_path'] = './images/';
$config['allowed_types'] = 'gif|jpg|png';
$config['overwrite']=TRUE;
$config['max_size'] = '100';
$config['max_width'] = '1024';
$config['max_height'] = '768';
$config['file_name']='avatar_'.$num;
$iconfig['image_library'] = 'GD2'; //i also wrote GD/gd2
$iconfig['create_thumb'] = TRUE;
//$iconfig['maintain_ratio'] = TRUE;
$iconfig['width'] = 70;
$iconfig['height'] = 90;
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
$this->load->view('upload_form', $error);
}
else
{
$data = array('upload_data' => $this->upload->data());
$this->load->view('upload_success', $data);
$this->load->library('image_lib');
$iconfig['source_image']=$data['upload_data']['full_path'];
$this->image_lib->initialize($iconfig);
if ( ! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}
}
}