[eluser]ggoforth[/eluser]
Ok, unless I'm not understanding how this should work, I think I'm doing everything right. Here is my process:
Upload Photo
Resize Photo
Create Thumbnail
All works except the creation of the thumbnail. I can't seem to perform two manipulations on one image. I can't resize it, then create a thumbnail.
here is my resizing code (this part works great):
Code:
$config['image_library'] = 'GD2';
$config['source_image'] = "./images/imageupload/$imgName";
$config['maintain_ratio'] = TRUE;
$config['create_thumb'] = FALSE;
$config['width'] = 500;
$config['height'] = 400;
$this->load->library('image_lib', $config);
if($this->image_lib->resize()){
$this->image_lib->clear();
return(true);
}else{
$this->image_lib->clear();
return(false);
}
Now at this point the uploaded photo has be resized to the right size and now I want a thumbnail to be created. So I call this code:
Code:
$config['image_library'] = 'GD2';
$config['source_image'] = "./images/imageupload/$imgName";
$config['dest_images'] = "./images/imageupload/";
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 100;
$config['height'] = 100;
if($this->image_lib->resize()){
$this->image_lib->clear();
return(true);
}else{
$this->image_lib->clear();
return(false);
}
This results in:
Quote:Your server does not support the GD function required to process this type of image.
Am I missing something here?
Thanks to anyone that can shed some light on this.
Greg