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.
You're probably right ... I can't change the "memory_limit" parameter, maybe becouse I'm on a shared server, I asked it to my hosting company. A curiosity: I read in forums that doesn't matter the size in bytes of the image, but the number of its pixels, and if I understand it for each pixel we need a byte and then the image is processed, there is no a way to use less resources?Reply
Search for memory in the site, or click here.
You can also check this post.