[eluser]mdvaldosta[/eluser]
Here's my code, where'd I go wrong? It creates the thumb, but leaves the original intact rather than resizing it also.
Code:
function _resize_image($filename)
{
// Load library
$this->load->library('image_lib');
// Make thumb configuration
$config['image_library'] = 'gd2';
$config['source_image'] = './assets/uploads/' . $filename;
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 200;
$config['height'] = 150;
// Make thumb from original image
$this->image_lib->initialize($config);
$this->image_lib->resize();
// Clear the image library
$this->image_lib->clear();
// Resize original configuration
$this->image_lib->clear();
$config['image_library'] = 'gd2';
$config['source_image'] = './assets/uploads/' . $filename;
$config['maintain_ratio'] = TRUE;
$config['width'] = 500;
$config['height'] = 375;
// Resize the original image
$this->image_lib->initialize($config);
$this->image_lib->resize();
}