image - PHP: ImageDestroy() with imagecopy()? -
it possible delete image-memory php-function "imagecopyresampled()"
fatal error: allowed memory size of 134217728 bytes exhausted (tried allocate 12288 bytes)
for example, have create images in loop:
<?php while($break===false){ $img=imagecreate($x); } function imagecreate($x){ $tmp= imagecreatefromjpeg($x); imagecopyresampled($img,$tmp,0,0,0,0,100,100,100,100); //imagedestroy($img); ??this destroying before return $img return $img; } ?>
how use imagedestroy()
imagecopyresampled()
?
dude there difference between imagedestroy()
destroy tmp_image temporary folder.
imagecopyresampled()
create resampling image original copy of image.
Comments
Post a Comment