Forum Moderators: coopster
Here's a sample piece of my code:
$imgplane = array_fill(0, $dwidth, array_fill(0, $dheight, 0));
for ($valx = 0; $valx < $dwidth; $valx++) {
for ($valy = 0; $valy < $dheight; $valy++) {
$rgb = imagecolorat($im, $valx, $valy);
$lum = getLum($rgb);
if ($lum < THRESH_UPPER && $lum > getLum($imgplane[$valx][$valy])) {
$imgplane[$valx][$valy] = $rgb;
}
}
}
Does anyone know why it's using so much memory? Is ther e a way to reduce the massive memory usage? Thanks!
Is it a memory leak or something?
(I've calculated that PHP used ~109bytes of memory to store an Int, which is 4 bytes. That's way too much memory to account for internal structs...)