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.
First, check the the web server's log, it will tell you why the process crashes, and will indicate whether it is due to memory running out.
It is true that the pixels count is important for the memory. But also the colour space, transparency, etc... It is quite hard to measure the memory used by GD, and I am not sure memory_get_peak_usage includes it.Reply
It is true that the pixels count is important for the memory. But also the colour space, transparency, etc... It is quite hard to measure the memory used by GD, and I am not sure memory_get_peak_usage includes it.