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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -