It would seem as though this is a rather common problem, but I haven't been able to locate an answer to my problem, nor have I been able to come up with a solution myself. I am trying to use the resize method of the image_lib class in order to make some images smaller. Here's the code:
function manipulate_picture($img_path, $hashed_id) {
$destination_image = 'img/entries_small/' . $hashed_id;
$config['image_library'] = 'GD2';
$config['source_image'] = $img_path;
$config['maintain_ratio'] = FALSE;
$config['width'] = 130;
$config['height'] = 75;
$config['new_image'] = $destination_image;
$this->CI->load->library('image_lib', $config);
$this->CI->image_lib->resize();
echo '<img src="'.base_url($config['new_image']).'">';
return $destination_image;
}
Which is called by the original image's path and the hashed_id of the same image. The echo code is obviously just for testing - however it is not producing any output (and there's no files to be found on the server either). I have checked that GD2 is enabled through phpinfo(). I've also checked that the image_lib gets loaded after having called load.
I really have no idea on what to do with this one.