Is there a way to prevent the PHP GD image library from running out of memory? If too large an image is uploaded, GD tends to run out of memory, terminating the script. I\'d
Do some tests to check how much memory each gd function need.
gd
imagecreatetruecolor seems to need width*height*5 bytes.
imagecreatetruecolor
width*height*5 bytes
imagepng seems to need width*height*4 bytes.
imagepng
width*height*4 bytes