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
After some investigation I think this may be a problem peculiar to my host.
It seems my hosting provider (1and1) may have a problem with its GD toolkit
http://drupal.org/node/73986
Simon