0

I am using codeigniter 2.1.2 on Win 8.1

and the following code is not working

$this->load->library('image_lib');

$config['image_library'] = 'GD2';
$config['source_image'] = 'C:/xampp/htdocs/imgt/wall/wallpaper2.jpg';

$config['create_thumb'] = TRUE;
$config['maintain_ratio'] = TRUE;
$config['width']     = 75;
$config['height']   = 50;

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

var_dump( $this->image_lib->resize()); // this returns true

What is the problem i checked GD is installed ??

I also tried the same code in 2.2.0 here too not working

4
Contributors
4
Replies
24
Views
3 Years
Discussion Span
Last Post by veedeoo
1

Yes the above will help point us in the right direction.

Could be a number of things, settings write permissions on the directory 777 you might have to set GD2 to lowercase, not sure if that makes any difference?

0

you might have to set GD2 to lowercase, not sure if that makes any difference?

Good suggestion, but no, the initialize() method uses strotolower() to rewrite the image_library value:

$this->image_library = strtolower($this->image_library);

A part that, it could be permissions, memory or other problems, like uploads size limits...

0

you can try using the absolute or relative url of the image or try adding

file://

## or

file:///
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.