<p>This is recipe is great. However, I meet a problem to show image.
</p>
<p class="vspace">The browser complains: "The image cannot be displayed because it contains error.".
</p>
<p class="vspace">My PHP is able to output text to image, because the following code is running OK.
</p>
<pre class="escaped"><?php
header("Content-type: image/png");
$im = @imagecreatetruecolor(500, 90)
              or die("Cannot Initialize new GD image stream");
$text_color = imagecolorallocate($im, 233, 104, 191);
imagestring($im, 5, 5, 5,  "A Simple Text String, Oh yeah!", $text_color);
imagepng($im);
imagedestroy($im);
?>
</pre>
<p class="vspace">This is the output.
</p><div class="property-Attach"><img src="http://www.pmwiki.org/pmwiki/uploads/Cookbook/php_image.png" alt="" title=""></div>
<p class="vspace">I cannot figure out the problem of this recipe, but an image for CAPTCHA is essential. Anyone could help?
</p>
Thanks