Welcome Guest, Not a member yet? Register   Sign In
ImageResize ?
#1

[eluser]CI-Newb[/eluser]
Hello, I have an image-resize going on an uploaded file. If I save the file as a new file
($config['new_image'] = './assets/userphotos/test1.jpg';) everything works as expected. No problems, all is a win! I'm resizing the image to 220x226. If I don't save it as a new file and let it overwrite itself it resizes the image to the correct dimensions but this is the final output: Image Error

Any thoughts? The dimensions of the file are correct but as you can see the image is smaller then the dimensions.


Code:
$config['image_library'] = 'gd2';
$config['source_image'] = $data['upload_data']['full_path'];
$config['maintain_ratio'] = FALSE;
//            $config['new_image'] = './assets/userphotos/test1.jpg';
$config['width'] = '220';
$config['height'] = '226';
$this->load->library('image_lib', $config);
$this->image_lib->resize();
#2

[eluser]CI-Newb[/eluser]
Solved, I had if ($this->image_lib->resize()) under $this->image_lib->resize(); was resizing it twice *ugh* only took me like three days to realize it Sad




Theme © iAndrew 2016 - Forum software by © MyBB