Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation Problems
#2

[eluser]Helmet[/eluser]
I'm having the same problem. I'm attempting to copy the uploaded image to a new location with a new name before doing some other things with it. My file structure is

/application
/photos
/system

..and photos is fully 0777. This is the code I'm using (in /application/controllers/file.php):

Code:
function resize($filename, $target_name){
    $config['image_library']  ='gd2';
    $config['source_image'] = 'photos/uploads/'.$filename;
    $config['new_image'] = 'photos/live/'.$target_name;
    $config['width'] = '300';
    $config['height'] = '450';
    $config['maintain_ratio'] = TRUE;
        
    $this->image_lib->initialize($config);
    if(!$this->image_lib->resize()){ echo $this->image_lib->display_errors(); }
}

I've tried all of these with no success:

$config['new_image'] = '/photos/live/'.$target_name;
$config['new_image'] = './photos/live/'.$target_name;
$config['new_image'] = '/full/path/to/photos/live/'.$target_name;

Result:

"Unable to save the image. Please make sure the image and file directory are writable."


Messages In This Thread
Image Manipulation Problems - by El Forum - 06-11-2009, 09:26 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 12:45 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 02:12 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 03:06 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 04:34 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 04:45 PM
Image Manipulation Problems - by El Forum - 07-04-2009, 05:09 PM
Image Manipulation Problems - by El Forum - 08-13-2010, 09:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB