Hey, I'm wondering if this is a bad idea, I have my reservations that the images will not get destroyed correctly
function draw(){
$image = imagecreate(200, 200);
//[...] draw rectanlges and stuff to image
return $image;
}
function send($image){
header("Content-type: image/png");
imagepng($image);
imagedestroy($image);
exit;
}
$img = draw();
send($img);
Will everything work the way I'm expected it to? I know it returns the resource id of the image but I just want to make sure I'm not missing anything.