I’m having a massive headache about Codeigniter and the image_lib class. I’ve searched for an answer but cannot find anything. I’m working on WAMP and have gd installed. Below is my code but i can’t get the image to output. Below is my code;
$config['image_library'] = 'gd';
$config['source_image'] = './uploads/096e1f3f1a7c6feb48e0887bea3733cc.jpg';
$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width'] = 75;
$config['height'] = 50;
$this->load->library('image_lib', $config);
$this->image_lib->resize();
When I execute this code I get a blank page. I’ve checked for errors; nothing is throw. The image path is correct when I do a file_exists check.
Any Ideas?
Thanks In Advance.
Are you sure you don’t want GD2?
Make sure that the GD library is enabled with PHP. Run phpinfo() and look for a GD section. This will also tell you the version you have installed.