Crop using coordinates

See all posts See thread Reply

Re: Crop using coordinates  new!
by Frank, 16 years, 2 months ago
Hi Colin

Well I have tested this one, but I get this error:

Fatal error: Call to undefined method upload::image_crop() in C:\xampp\htdocs\index.php on line 114

Is there something I miss here?Reply
Re: Crop using coordinates  new!
by colin, 16 years, 2 months ago
Sorry, there was a bug in the code I linked to. The correct code is:
if ($handle->uploaded) {
  if ($handle->file_is_image) {
    $handle->image_convert = 'jpg';
    $handle->image_crop = array($y1, $handle->image_src_x - $x2, $handle->image_src_y - $y2, $x1);
    $handle->process('/my/dir/');
  }
}
Reply