class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
I may implement such a feature in a future release. In the meantime, you can simply read image_src_x and image_src_y before calling process(), and act accordingly. For instance:
$handle = new Upload($_FILES['xxxx']); if ($handle->uploaded) { $handle->image_convert = 'jpg'; $handle->image_resize = true; $handle->image_ratio = true; $handle->image_x = $handle->image_src_x / 2; // 50% $handle->image_y = $handle->image_src_y / 2; // 50% $handle->Process("images/"); $handle->Clean(); }