I am new in using Php with Images.
I had found the code to display Image
<<?php
// Create a blank image and add some text
$im = imagecreatetruecolor(120, 20);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, 'A Simple Text String', $text_color);
// Save the image as 'simpletext.jpg'
imagejpeg($im);
// Free up memory
imagedestroy($im);
?>>
But firefox show some bogus code instead of that Image.here is the link to the Image that Firefox shows
http://tinypic.com/r/htw6cm/7
Here is the link to the Image
What are you seeing the the “bytes” of an image. By default your browser will think that your script is about to print some text. So you end up seeing some strange characters.
Since you are printing not text, but image, you need to tell the browser that the contents of your script will be an image. You can do this by sending a header like that: