Skip to content

Geek Philip

I share about Magic, Magicians, Technology, Coding and more

  • About Me
  • Magic & Magicians
  • Technology
  • Social Media
  • Coding

Known as Magician Philip and Geek Philip

Magician, illusionist, Tech savvy, Actor, TV star, Founder of Indian Magicians and World of Magicians Portal

Recent Posts

  • Migrate from SVN to Github Source control
  • Migrate from TFS to Github Source control
  • These young magicians from India will leave you spellbound on Deccan Chronicle – Sept 29th 2015
  • National Integration Magic show organized by Survana Karnataka Kerala Samajam on Deepika Malayalam Newspaper dated Aug 15th 2014
  • No Matter How Grown Up We Are, We Will Be Fascinated By These 9 Indian Magicians on Polka cafe – May 20th, 2015

Tags

  • 11.10
  • Android
  • Android TV
  • Browser
  • C#
  • Canonical
  • Debian
  • f8
  • Facebook
  • features
  • Firefox
  • FOSS
  • Free Software
  • Google
  • Google Chrome
  • HTML
  • HTML5
  • Ice-cream Sandwich
  • Image
  • Indian Magicians
  • Internet Explorer
  • Javascript
  • Jquery
  • Linux
  • MAC
  • Magician
  • Magician Philip
  • Microsoft
  • Mozilla
  • mysql
  • Neel Madhav
  • Open Source
  • Oracle
  • Philip Tiju Abraham
  • Php
  • Released
  • Skype
  • Social Media
  • The Dream of Gandhi-ji
  • Ubuntu
  • Ubuntu One
  • Ugesh Sarcar
  • unity
  • Upgrade
  • Windows


flipkart.com

flipkart.com


flipkart.com


Tag: Text logo

Generate Text Image using PHP

Generate Text Image using PHP

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:
philiptijuabraham

 
Share
Posted on September 19, 2011April 1, 2012Categories CodingTags Dymanic Text, Dynamic Image, font, Php, text image, Text logo1 Comment on Generate Text Image using PHP
Proudly powered by WordPress