Crop using coordinates

See all posts See thread 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