An Intro to Using the GD Image Library with PHP
(Page 1 of 6 )
A brief introduction to the world of image manipulation in PHP using the GD library. In this tutorial I will step you through creating a clock that will display the current time.
Before we really get into things, let me clue you into something. I am not a graphic designer. I have no urge to be and have no talent to be. To put it bluntly, my graphics suck. Also, to use what you learn in this tutorial, you will need PHP 4.0.6 or higher and at least GD 2.0.1.
Ok, with that out of the way, on to the GD library! So, what use are the GD library functions in PHP? Creating images on the fly. Why would you want to do that? Well, if there are some images that have content that changes. Take for instance this clock :

If I didn't create that clock on the fly, it would be quite a pain to show the proper time. Can you imagine having 43,200 different images on your server just to be able to show what time it is? That's why we need to create the image on the fly. Creating images on the fly isn't for everything. If you have an image that doesn't change, don't recreate it every time. That is just putting unnecessary cycles on your server.
Next: Getting to Know the Functions >>
More Miscellaneous Articles
More By Matt Wade