Chapter 27. Working with Images

Basic Image Creation Using GD

To introduce you to the concept of working with images in PHP, let's look at the general technique that is employed when scripting using the GD graphics library. This process can be generalized into the following steps:

  1. Creation of an image “canvas” in memory by creating a new image or by loading an existing image.

  2. Allocation of colors used in the image (if necessary).

  3. Performing of any drawing or other image manipulations necessary on the canvas.

  4. Saving the canvas to a file in a supported image ...

Get PHP 5 Unleashed 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.