I'm cropping an image that was submitted through a form with a jQuery crop plugin. I have the following. But, how can I find out the path to the destination image?
$pic = $this->input->post('pic');
//Get the coordinates from the image crop
$x = $this->input->post('x');
$y = $this->input->post('y');
$w = $this->input->post('w');
$h = $this->input->post('h');
$src = imagecreatefromjpeg($pic);
$dest = ImageCreateTrueColor($w, $h);
imagecopy($dest, $src, $x, $y, $x, $y, $w, $h);
You just need to declare the path.
or for smaller images