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

[eluser]merrick.christensen[/eluser]
Hey guys! I am having an image resizing issue. I am getting a success message but the image itself isn't being resized. Any help would be greatly appreciated. Thanks!

Code:
function manipulate($image_url)
    {
        $this->load->library('image_lib');
        
        $config['image_library'] = 'gd2';
        $config['source_image'] = '/uploads/' . $image_url;
        $config['maintain_ratio'] = FALSE;
        $config['width'] = 180;
        $config['height'] = 400;
        
        $this->load->library('image_lib', $config);
        
        if ( ! $this->image_lib->resize())
        {
            echo $this->image_lib->display_errors();
        } else {
            echo "Nice Resize";
            echo $config['source_image'];
        }
    }
#2

[eluser]clip[/eluser]
You may want to throw in a:
Code:
$config['new_image'] = '/path/to/new/image.jpg';
Into your config array.




Theme © iAndrew 2016 - Forum software by © MyBB