Welcome Guest, Not a member yet? Register   Sign In
Image Manipulation, resize working, crop not
#4

[eluser]lefrog[/eluser]
I can get the crop_image function to crop by changing the image library to imagemagick. My server company won't have imagemagick installed on the boxes so I can use it locally but not in my application.

So this shows it must be something to do with GD2. Anyone have any ideas.

Code:
function crop_image($source, $x, $y)
        {
            /*
            $rules['image_library'] = 'GD2';
            $rules['source_image']    = $source;
            $rules['x_axis'] = '76';
            $rules['y_axis'] = '76';
            $this->image_lib->clear();
            $this->image_lib->initialize($rules);
            if ( ! $this->image_lib->crop())
            {
                die($this->image_lib->display_errors());
            }
            die($source);
            */
                $rules = array();
                $rules['image_library'] = 'imagemagick';
                $rules['library_path'] = '/usr/local/bin';
                $rules['source_image']    = $source;
                $rules['x_axis'] = $x;
                $rules['y_axis'] = $y;
                $this->image_lib->initialize($rules);
                if ( ! $this->image_lib->crop())
                {
                    die($this->image_lib->display_errors());
                }
        }


Messages In This Thread
Image Manipulation, resize working, crop not - by El Forum - 01-29-2008, 05:51 PM
Image Manipulation, resize working, crop not - by El Forum - 01-29-2008, 06:07 PM
Image Manipulation, resize working, crop not - by El Forum - 01-29-2008, 06:39 PM
Image Manipulation, resize working, crop not - by El Forum - 01-29-2008, 06:57 PM
Image Manipulation, resize working, crop not - by El Forum - 01-30-2008, 04:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB