HomePHP Drawing Functions and the GD Library in PHP
Drawing Functions and the GD Library in PHP
If you're a PHP developer looking for an approachable guide on how to use the popular GD extension available with PHP 4 and PHP 5, then look no further, because this series might be what you need. Welcome to the third article of the series that began with "A Close Look at the GD Library in PHP." In this group of tutorials, you'll find distilled material on using the most important functions that come integrated with the GD library.
As you probably recall, in the previous tutorial of the series I showed you a considerable number of practical examples to demonstrate how to utilize some of the intuitive functions bundled with the GD library. These functions dynamically generated different image streams from existing graphics.
Of course, the implementation of this concept led me straight to teaching you how to use the now familiar "imagecreatefromgif()," imagecreatefromjpeg()" and "imagecreatefrompng()" functions. These functions came in handy for creating a brand new image stream from an existing GIF, JPG, or PNG graphic.
As you have learned so far, the GD extension provides PHP developers with a great range of functions for building image streams from scratch, as well as creating streams from existing graphics. I have to admit that I'm far from covering the entirety of the helpful functions bundled with this powerful graphical library, but we have further to travel on this educational journey.
In this third article of the series I'll show you how to take advantage of a few more handy functions integrated with this library. These function will help you perform some basic drawing operations on a specified image stream.
Hopefully, after you finish reading this tutorial, you'll have a more solid background in how to use the GD extension to draw basic lines and characters, circles, rectangles, and other polygons too, thanks to using some simple GD functions.
So, are you ready to take your first steps into drawing with the GD extension? All right, let's begin now!