Welcome Guest, Not a member yet? Register   Sign In
Your server does not support the GD function required to process this type of image
#1

[eluser]Frank Rocco[/eluser]
Here is my code.
Any idea why this is happening?
Thanks
Code:
$this->load->library('image_lib');
            
$config['image_library'] = 'GD2';
$config['source_image'] = $_SERVER['DOCUMENT_ROOT'].'/img/'.$row->imagePath;
$config['new_image'] = $_SERVER['DOCUMENT_ROOT'].'/img/t_'.$row->imagePath;
$config['thumb_marker'] = '';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['master_dim'] = 'width';
$config['width'] = 75;
$config['height'] = 75;

$this->load->library('image_lib', $config);
$this->image_lib->initialize($config);  
                    
if(!$this->image_lib->resize()){
    echo "Failed." . $this->image_lib->display_errors();
}
#2

[eluser]Frank Rocco[/eluser]
I resolved this.
Code:
$config['image_library'] = 'gd2';
$config['source_image'] = $_SERVER['DOCUMENT_ROOT'].'/img/'.$row->imagePath;
$config['new_image'] = $_SERVER['DOCUMENT_ROOT'].'/img/t_'.$row->imagePath;
$config['maintain_ratio'] = TRUE;
$config['master_dim'] = 'width';
$config['width'] = 75;
$config['height'] = 75;

$this->load->library('image_lib', $config);
                    
if(!$this->image_lib->resize()){
    echo "Failed." . $this->image_lib->display_errors();
}
#3

[eluser]John_Betong[/eluser]
Take a look at your phpinfo(): and see what library is being used.




Theme © iAndrew 2016 - Forum software by © MyBB