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.
20MB is not a lot at all if you want to process images. Also, the size of the image is not important; only the dimensions in pixels are relevant, as the image is uncompressed as bitmap in memory.
What are the errors that you get?