
Murray Nich - 2008-02-15 15:23:30 -
In reply to message 1 from Kevin Richard
This is an error from the GD library. Processing the image has used more memory than is availabe to the php script.
The GD library is very heavy on memory usage when processing large images.
Its not the size of the picture in Kb that counts its the PIXEL count ie 2000px*2000px etc.
If you do not have direct access to php.ini on the server to change the default 8Mb memory limit to something else, you can try using ini_set("memory_limit","32M"); at the top of your script. change 32 to whatever your images require or your server will allow(there can be other scripts restricting memory use on to applications on the server).
Im no expert at this stuff but I have been working with a cropping application built to crop large images with the Gd library, proving quite a challenge with GD.
I couldnt find any definative calculations for working out how much memory would be used by the server, a few ideas but no exact answers that seemed to corilate with the erros I was getting, so if anyone has one please yell out.