Topic: Regarding Image display
Hi,
I would like to create image using php and display on the browser. The text for the image will be taken from database. I created one, but for the next image, i dont know how to proceed. It simply shows only one image. I want to print list of images 1 below the other, Example; List of Albums Names. If anyone know about image creation in PHP, do suggest.
here is my simple code.
<?
$text="Topic Heading / Sub-Heading";
$x=10;
$y=20;
$w=500;
$h=27;
$size=10;
$fontfile="VERDANA.TTF";
$angle=0;
header ("Content-type: image/png");
$im = @imagecreate ($w, $h) or die ("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate ($im, 251, 121, 34);
$text_color1 = imagecolorallocate ($im, 0, 0 , 0);
$text_color2 = imagecolorallocate ($im, 255, 255, 255);
ImageTTFText ($im, $size, $angle, $x+1, $y+1, $text_color2, $fontfile, $text);
ImageTTFText ($im, $size, $angle, $x, $y, $text_color1, $fontfile, $text);
imagepng ($im);
imagedestroy ($im);
?>