Welcome Guest, Not a member yet? Register   Sign In
Image Crop with Multiple x and y axis
#1

[eluser]dennismonsewicz[/eluser]
I have a form where a user can upload an image but can then use http://odyniec.net/projects/imgareaselect/ to select the height, width and will submit that along with the x and y axis' of their selection.

Is there anyway to crop the image and set multiple axis'?

Code:
Code:
$this->load->library('image_lib');
            $config['image_library'] = 'gd2';
            $config['library_path'] = '/usr/bin';
            $config['source_image'] = getcwd() . '/images/homepage/' . $category . '/' . $this->input->post('photo');
            $config['maintain_ratio'] = true;
            // $config['height'] = 104;
            // $config['width'] = 277;
            $config['x_axis'] = $this->input->post('x2');
            $config['y_axis'] = $this->input->post('y1');
            $config['height'] = $this->input->post('height');
            $config['width'] = $this->input->post('width');




Theme © iAndrew 2016 - Forum software by © MyBB