Tong-Pak-Fu
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Tong-Pak-Fu

A place to relax and discuss.
 
HomePortalSearchLatest imagesRegisterLog in

 

 Php: Creating Dynamic Images

Go down 
AuthorMessage
EchizenR
Moderator
EchizenR


Number of posts : 99
Registration date : 2007-03-24

Php: Creating Dynamic Images Empty
PostSubject: Php: Creating Dynamic Images   Php: Creating Dynamic Images Icon_minitimeSat 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
Back to top Go down
 
Php: Creating Dynamic Images
Back to top 
Page 1 of 1
 Similar topics
-
» Creating a Default Forum Sig
» Having a Problem Creating an Account?

Permissions in this forum:You cannot reply to topics in this forum
Tong-Pak-Fu :: Graphics And Web Discussion :: Photoshop/Webdesign :: Tutorial :: Web Design Tutorials-
Jump to: