Upload Query V2 -> Codeigniter

Hello,

I have been modifying my code for another section of my site to resize images etc for a gallery,

I am now getting:

Column 'thumbpath' cannot be null

I have tried to do what was stated in my original question by setting

$thumb_info = $thumb_info = $this->image_lib->resize();

and then in my $data array I have set it like

'thumbpath' => $thumb_info['create_thumb']

but this causes a PHP error ->

Fatal error: Call to a member function resize() on a non-object in addimage.php on line 60

I also am struggling to get the error or success messages to post into the view:

View

<?php
//Setting form attributes
$formAddImage = array('id' => 'addImage', 'name' => 'addImage');
$imageImage = array('id' => 'userfile', 'name' => 'userfile', 'placeholder' => 'File Location*');
$imageDescription = array('id' => 'description','name' => 'description','placeholder' => 'Image Description*');
?>


<section id = "validation"><?php echo validation_errors();?></section>

<?php
if(!empty($success)) : ?>

<section id="validation"><?php echo $success; ?></section>

<?php endif; ?>

<?php
echo form_open_multipart('admin/addimage', $formAddImage);
echo form_fieldset();
echo form_upload($imageImage);
echo form_textarea($imageDescription);
echo form_submit('submit','Submit');
echo form_fieldset_close();
echo form_close();
?>

Controller


if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Addimage extends CI_Controller { 

    function __construct(){ 
    parent::__construct(); 
    } 
    function index() { 
    if(!$this->session->userdata('logged_in')) { 
        redirect('admin/home'); 
    } 
    // Main Page Data 
    $data['cms_pages'] = $this->navigation_model->getCMSPages(); 
    $data['title'] = 'Add Gallery Image'; 
    $data['content'] = $this->load->view('admin/addimage',NULL,TRUE); 

    $this->load->view('admintemplate', $data); 

    //Set Validation 
    //$this->form_validation->set_rules('userfile', 'userfile', 'trim|required'); 
    $this->form_validation->set_rules('description', 'Description', 'trim|required'); 

    if($this->form_validation->run() === TRUE) { 

    //Set File Settings 
    $config['upload_path'] = 'includes/uploads/gallery/'; 
    $config['allowed_types'] = 'jpg|png'; 
    $config['max_size'] = '100'; 
    $config['max_width'] = '1024'; 
    $config['max_height'] = '768'; 

    $this->load->library('upload', $config);
    if(!$this->upload->do_upload()) {
	
	$error = array('imageError' => $this->upload->display_errors());
	$this->load->view('admintemplate', $data); 
    }
    else{
	$data = array('upload_data' => $this->upload->data());
	$config['image_library'] = 'GD2';
	$config['source_image'] = $this->upload->upload_path.$this->upload->file_name;
	$config['new_image'] = 'includes/uploads/gallery/thumbs/';
	$config['create_thumb'] = 'TRUE';
	$config['maintain_ratio'] = 'FALSE';
	$config['width'] = '200';
	$config['height'] = '150';
	
	$this->load->library('image_lib', $config);
	$this->image_lib->resize();
    }
    
    $file_info = $this->upload->data();
    
    $data = array(   
        'description' => $this->input->post('description', TRUE), 
        'fullpath' => $file_info['file_name'],
	'thumbpath' => $file_info['create_thumb']
        ); 
    $this->image_model->addImage($data);
    
    $this->data['success'] = 'Thank You, Your Image Has Been Uploaded';
    } 
 } 

}

Model


	function addImage($data) {
		$this->db->insert('images',$data);
		return;
	}