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.
more info about the class
I'm using version 0.20 of the class and GD library version 2.0.28.
The script works perfectly when $handle->image_resize is set to false.
The file being processed is a jpg image with a file size of 227.25KB.
Any ideas on how to resolve this will be greatly appreciated.