Lots of people stereotype PHP as only being suitable for outputting text, but that’s not true—you can use PHP to create complex and dynamic pictures using the GD image extension. This chapter covers many of the GD functions that will allow you to make your own images for your site, either from scratch or by using existing images.
For image manipulation purposes, PHP ships with its own copy of the popular GD library. You used to have to get your own copy of GD and hope it was compatible with your PHP version. This is no longer the case. The copy of GD that ships with PHP will work with that version of PHP.