txt2img

On September 22, 2009, in PHP, Tips, Tricks, by admin

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,”phpsolutions.co.in!”,$textcolor);
ImagePNG ($img, “phpsolutions.png”);
$img2 = imagerotate ($img, 100, 0);
ImagePNG($img2,”phpsolutions.png”);
ImageDestroy($img);
ImageDestroy($img2);
?>

2 Responses to txt2img

  1. Anonymous says:

    I had been just browsing occasionally along with to learn to read this post. I have to admit that we’re inside hand of luck today if not getting such an excellent post to read wouldn’t are actually achievable for me personally, at the very least. Really appreciate your articles.

  2. Anonymous says:

    Many thanks for making the effort to debate this, I am strongly about it and love learning read more about this topic. If possible, because you gain expertise, do you mind updating your site with extra information? It is extremely helpful for me.

Leave a Reply