RSS

txt2img

22 Sep

Here is the code to convert text to image or simply write text on image….

<?php
$img=ImageCreate (100,20);
$background_color=ImageColorAllocate($img,255,205,255);
$textcolor=ImageColorAllocate ($img,203,14,91);
ImageString($img,3,5,5,”svnlabs.com!”,$textcolor);
ImagePNG ($img, “svnlabs.png”);
$img2 = imagerotate ($img, 100, 0);
ImagePNG($img2,”svnlabs.png”);
ImageDestroy($img);
ImageDestroy($img2);
?>

Advertisements
 
Leave a comment

Posted by on September 22, 2009 in LAMP, php, Tips, Tricks

 

Tags: , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: