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 -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -