Welcome Guest, Not a member yet? Register   Sign In
Crop output basic not working! please help!
#2

[eluser]tonanbarbarian[/eluser]
I have always found it is safest to use absolute links when working with the image library
so set you $folder to the absolute link rather than relative
Also try setting the dimensions as numbers not strings

i.e.
Code:
function output()
    {
        $folder = "/full/path/to/assets/images/content/".$this->uri->segment(3)."/".$this->uri->segment(4)."/";
        
        $this->load->library('image_lib');
        
        // RESIZE
        $config['image_library'] = 'GD2';
        $config['source_image'] = $folder."main.jpg";
        $config['maintain_ratio'] = FALSE;
        $config['dynamic_output'] = TRUE;
        $config['x_axis'] = 100;
        $config['y_axis'] = 60;

        $this->image_lib->initialize($config);

        if (!$this->image_lib->crop())
        {
            echo $this->image_lib->display_errors();
        }
    }


Messages In This Thread
Crop output basic not working! please help! - by El Forum - 01-15-2008, 04:50 PM
Crop output basic not working! please help! - by El Forum - 01-15-2008, 06:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB