Instead of having a fixed amount allocated for each request I suggest the
following code to be added:
// get image size of img
$x = @getimagesize($img);
//multiply width per height per 4 bytes.
$estimatedMemory = $x[0] * $x[1] * 4;
//convert memory to Megabyte and add 10 in order to allow some slack
$estimatedMemory = round(($estimatedMemory/1024)/1024,0)+10;
$v = ini_set('memory_limit', "$estimatedMemory"."M");
Original issue reported on code.google.com by ifhost...@gmail.com on 26 Nov 2010 at 1:58
Original issue reported on code.google.com by
ifhost...@gmail.com
on 26 Nov 2010 at 1:58