[eluser]AlexJ[/eluser]
Hello, I am trying to resize a image to a certain size AND create a thumb of a certain size, this bit of code does not seem to work, it creates the thumbnail with the given size, but it just leaves the original image untouched:
Code:
$this->load->library('image_lib');
// Resize the resized image to a thumbnail
$thumbnail = array();
$thumbnail['source_image'] = $image;
$thumbnail['width'] = $presets['thumbnail']['width'];
$thumbnail['height'] = $presets['thumbnail']['height'];
$thumbnail['thumb_marker'] = '_new_thumb';
$thumbnail['maintain_ratio'] = $presets['thumbnail']['keep_aspect'];
$thumbnail['create_thumb'] = TRUE;
$this->image_lib->initialize($thumbnail);
if(!$this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}
$this->image_lib->clear();
// Resize the original image to the setting
$large = array();
$large['source_image'] = $image;
$large['width'] = $presets['large']['width'];
$large['height'] = $presets['large']['height'];
$large['maintain_ratio'] = $presets['large']['keep_aspect'];
$this->image_lib->initialize($large);
if(!$this->image_lib->resize())
{
echo $this->image_lib->display_errors();
}
It was a late night build so maybe I looked something over the head

Does someone see anything wrong with this code?
Thanks!