I am using CodeIgniter To upload as well as resize images. Using library image_lib and loading it in the following way. My upload is working fine but having problem with the php gd function. When printing the error it says, "Your server does not support the GD function required to process this type of image." I did not have gd enabled. I have restarted my xampp after enabling it. And still have the problem.
//get the image sizes
$image_sizes = $this->image_model->get_image_sizes();
foreach ($image_sizes as $image_size) {
$this->load->library('image_lib');
$mod_config['image_library'] = 'gd2';
$mod_config['source_image'] = './uploads/';
$mod_config['create_thumb'] = TRUE;
$mod_config['maintain_ratio'] = TRUE;
$mod_config['width'] = $image_size->image_size_width;
$mod_config['height'] = $image_size->image_size_height;
$this->image_lib->initialize($mod_config);
if ( ! $this->image_lib->resize())
{
echo $this->image_lib->display_errors();exit;
}
$this->image_lib->clear();
}