One of the useful things you can do with PHP is create images on the fly. PHP has some built-in image information functions, and you can also use the GD2 library to create new images or manipulate existing ones. This chapter discusses how to use these image functions to achieve some interesting and useful effects.
Key topics covered in this chapter include
Setting up image support in PHP
Understanding image formats
Using automatically generated images in other pages
Using text and fonts to create images
Drawing figures and graphing data
Specifically, we look at two examples: generating website buttons on the fly and drawing a bar chart using figures from a MySQL database.
We use the GD2 library here, but there ...