Chapter 19. GENERATING GRAPHICS

Topics in This Chapter

  • Dynamic Buttons

  • Generating Graphs on the Fly

  • Bar Graphs

  • Pie Charts

  • Stretching Single-Pixel Images

This chapter explores generating graphics using the GD extension functions described in Chapter 12. "Image Functions." It is important to be aware of the issues involved with the creation of graphics on the fly. The first is that it is relatively costly in terms of CPU time. In most cases the flexibility of dynamic graphics is not worth what you pay in the load imposed on the server. Another issue is that making nice-looking graphics from PHP functions is not easy. Common techniques like drop shadows are next to impossible. As you will see in the examples that follow, a lot of work goes into creating ...

Get Core PHP Programming: Using PHP to Build Dynamic Web Sites 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.