Hi,
You should be able to do something like this :
Code:
ob_start();
imagepng($image);
$contents = ob_get_contents();
ob_end_clean();
echo "<img src='data:image/png;base64,".base64_encode($contents)."' />";
but I've not tested it. The main idea is to keep the scripts doing the pictures away from the code that is generating your HTML page.
JD.