Generating Text Image Logo using PHP is quite simple and straight forward. May be the following code might help you to create logos, captcha, titles etc…
if (!(file_exists("logophilip.png"))) // Checks file exist or not
{
$imgvalue = "Philip Tiju Abraham"; // Assign some text for the logo
$font_file = 'font.ttf'; // font name/path
$pic=ImageCreate(500,70); // Define the size of the image a x b
$col1=ImageColorAllocate($pic,217,209,188); // Background
$col2=ImageColorAllocate($pic,79,79,79); // Fontcolor
ImageFilledRectangle($pic,1,1,100,100,$col1);
ImageFtText($pic, 35, 0, 0, 50, $col2, $font_file, $imgvalue);
ImagePNG($pic,"logophilip.png"); // Thats it done...
ImageDestroy($pic);
}
I don’t think I need to explain how it works. Just place the code and enjoy. Make sure you have the font in the same folder or update $font_file with respective path.
Output: