EchizenR Moderator
Number of posts : 99 Registration date : 2007-03-24
| Subject: Php: Creating Dynamic Images Sat May 05, 2007 4:54 am | |
| Mmkay, here is how you create a dynamic image with your own string of text.. - Code:
-
<?php header("Content-type: image/png"); $im = @imagecreate(200, 15) or die("Cannot Initialize new GD image stream"); $background_color = imagecolorallocate($im, 255, 255, 255); $text_color = imagecolorallocate($im, 233, 14, 91); imagestring($im, 10, 0, 0, "A Simple Text String", $text_color); imagepng($im); imagedestroy($im); ?> As you can see it displays a png image with the text, "A Simple Text String".. If you play around with the code you can make it useful ;D | |
|