Welcome Guest, Not a member yet? Register   Sign In
Resizing image problem
#1

[eluser]K-C[/eluser]
I have been trying to resize an uploaded image to create thumbnail and never managed to create the thumbnail file in the folder, however I am able to upload the original file. PLease enlighten me on what's wrong in my code. My code is as follow.


$img = $this->upload->data();
$uploadDir = $basepath.'/imgs/test/';
// let's create a thumbnail while we're here.
$config['image_library'] = 'GD2';
$config['source_image'] = $img['file_name'];
$config['new_image'] = $basepath.'/imgs/thumb_'.$img['file_name'];
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 5;
$config['height'] = 5;

$this->load->library('image_lib');
$this->image_lib->initialize($config);
$this->image_lib->resize();


Messages In This Thread
Resizing image problem - by El Forum - 08-24-2007, 01:36 AM
Resizing image problem - by El Forum - 08-24-2007, 03:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB