Welcome Guest, Not a member yet? Register   Sign In
Image Library Resize problem
#1

[eluser]bapobap[/eluser]
Hi there,

I'm having a problem with the image library functionality. I noticed it had stopped working (during development) and can't figure out why, as nothing has changed in my application or my development setup to cause it.

Here is the code:
Code:
// Create a thumbnail
        $config['image_library']    = 'gd2';
        $config['source_image']    = $new_file_name_orig;
        $config['new_image']        = $new_file_name_thmb;
        $config['maintain_ratio']    = TRUE;
        $config['width']            = 120;
        $config['height']            = 120;
        $config['quality']            = 100;

        $this->load->library('image_lib', $config);
        var_dump($this->image_lib->resize());
        echo '<br />';
        var_dump($this->image_lib->display_errors());

The $new_file_name_orig var is just the path to the image, which is correct. The $new_file_name_thmb is the path to the thumbnail I want created. The original file is CHMOD'd to 777 and the folder that contains it, as well as the folder I'm writing the thumbnail to are 777.

The results of my debugging seem to suggest the image is being resized:

Code:
bool(true)
string(0) ""

but it's not. No image is created in the thumbnail directory and no image is resized. I thought it might have been something simple like the path being wrong but since the debug output returns TRUE, I'm guessing the problem is elsewhere?

Any ideas kind people?!


Messages In This Thread
Image Library Resize problem - by El Forum - 11-10-2008, 01:45 PM
Image Library Resize problem - by El Forum - 11-10-2008, 01:54 PM



Theme © iAndrew 2016 - Forum software by © MyBB