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.
Yes. As on the Drupal page, 40MB should be enough for a 2MB image (you would need something like 12MB for that).
So it looks like your host has an issue with its GD package. Maybe they restrict the amount of memory that can be used by GD so it is not to heavy on their servers, etc... I'm afraid that you will have to talk to them for a solution. Else, change host :/Reply
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
So it looks like your host has an issue with its GD package. Maybe they restrict the amount of memory that can be used by GD so it is not to heavy on their servers, etc... I'm afraid that you will have to talk to them for a solution. Else, change host :/