Chapter 9. Graphics

The Web is more than just text. Images appear in the form of logos, buttons, photographs, charts, advertisements, and icons. Many of these images are static, built with tools such as PhotoShop and never change. But many are dynamically created—from advertisements for Amazon’s referral program that include your name to Yahoo! Finance’s graphs of stock performance.

PHP supports graphics creation with the GD and Imlib2 extensions. In this chapter we’ll show you how to generate images dynamically with PHP, using the GD extension.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.