-
2006-09-26
thomask77
When i try to automatically resize big images (like 3072x2304 from my digital camera), GD resize will fail because
if(!is_mem_available(($from_w * $from_h * 4) + ($to_w * $to_h * 4))){
return false;
}
in fetch.php will return false, which seems to be the wanted behaviour (it's called with 28430156 bytes and memory_limit is set to 8M in php.ini).
but: if i comment out the above lines, everything will work fine. So resize_imageGD seems to use less memory than expected, and the check is too restrictive.
-
2006-10-21
gb
Cannot reproduce this (using RC2, RC3 and current) with pictures of exactly the same size. I even can't reproduce it on an other wiki running Release 2006-03-09. Which version are you using? Can you please make a test with RC3 version (available from DokuWiki website) and report back?
Thanks
-
2007-01-06
andi
I just did some testing using the memory_get_peak_usage() function - if this works as I understand it, libGD seems to use *much* fewer RAM then assumed in the mentioned check.
But I'm not sure what the right way to estimate the needed memory is. I'm open to suggestions.
-
2010-08-27
andi
-
2010-09-03
gb
This bug is so old that I doubt we should keep it opened if we cannot confirm the reported issue.
-
2010-09-03
gb
"bug is so old" -> our fault of course :-(
-
2010-09-03
andi
The comments linked in the stackoverflow answer aren't as helpful as I thought initially. Their calculations are even higher than my naive approach. I guess unless someone digs through the gdlib code to find the *real* way they allocate memory we should leave it as is.
-
2010-09-09
andi
closed until someone sends a patch