O'Reilly logo

PHP 5 Unleashed by John Coggeshall

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 format ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required