CodeIgniter Forums
Image lib error - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Image lib error (/showthread.php?tid=2766)



Image lib error - El Forum - 08-23-2007

[eluser]emperius[/eluser]
In the settings i have
$config['maintain_ratio'] = TRUE;

however on resize just width changes. How to change the height in proportion to width

the code follows

Code:
$imgpath = realpath("public/logo/".$resarr['file_name']);
$config['image_library'] = 'GD2';
$config['source_image'] = $imgpath;
$config['maintain_ratio'] = TRUE;
$config['width'] = 200;            
$this->load->library('image_lib', $config);
$this->image_lib->resize();



Image lib error - El Forum - 08-23-2007

[eluser]Derek Allard[/eluser]
I'm not sure, but do you think it could be this bug?


Image lib error - El Forum - 08-29-2007

[eluser]mjijackson[/eluser]
Derek-

Check out the fix I posted on the bug report. I think it should fix the problem.