EllisLab text mark
Advanced Search
     
ImageResize ?
Posted: 09 October 2012 02:08 PM   [ Ignore ]
Joined: 2012-08-13
26 posts

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.

$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(); 
 
Posted: 09 October 2012 02:19 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2012-08-13
26 posts

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 :(