Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter multipIe image thumbnailing issue:
#1

[eluser]Unknown[/eluser]
I want to create two thumbnails withh different sizes for same image. In my code only first thumbnail code created
and following error occured.
Error: "Your server does not support the GD function required to process this type of image."

Code:
function createThumb1($imageName)  //file name passed
    {    
        
            
            // this thumbnail created
        $config['image_library'] = 'gd2';
        echo $config['source_image']    = $_SERVER['DOCUMENT_ROOT'].'/uploads/'.$imageName;
        
        $config['create_thumb'] = TRUE;
        $config['maintain_ratio'] = false;
        $config['width']     = 80;
        $config['height']    = 80;
        $config['new_image'] = $_SERVER['DOCUMENT_ROOT'].'/images/uploads/thumbs/'.$imageName;
        $this->load->library('image_lib', $config);
        if ( ! $this->image_lib->resize()){echo $this->image_lib->display_errors();}
        
        $this->image_lib->clear();
        
        // unable to create this this thumbnail
        $config['image_library'] = 'gd2';
        echo $config['source_image']    = $_SERVER['DOCUMENT_ROOT'].'/uploads/'.$imageName;
        $config['create_thumb'] = FALSE;
        $config['maintain_ratio'] = false;
        $config['width']     = 696;
        $config['height']    = 241;
        $config['new_image'] =  $_SERVER['DOCUMENT_ROOT'].'/images/uploads/'.$imageName;
        $this->load->library('image_lib', $config);
        if ( ! $this->image_lib->resize()){echo $this->image_lib->display_errors();}
        
        
        $this->image_lib->clear();
        
        
        
        
        
        
        $this->load->view('admin/upload_form',array('error' => ' ' ));
        
        
        
        
        
    }


Messages In This Thread
CodeIgniter multipIe image thumbnailing issue: - by El Forum - 08-01-2011, 03:37 AM
CodeIgniter multipIe image thumbnailing issue: - by El Forum - 08-01-2011, 06:44 AM
CodeIgniter multipIe image thumbnailing issue: - by El Forum - 08-02-2011, 01:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB