This article, the first of two parts, describes a fun little project that will help you sharpen your image manipulation skills. The completed application takes an image and converts it to a string of text that resembles the original image. Brian Vaughn gets you started.
Sometimes programming is work, but sometimes… it's fun.
Today we're going to work on a fun programming project involving image manipulation. This project will require that PHP be installed with the GD library (available at http://www.boutell.com/gd/, or bundled along with PHP 4.3 and later).
The purpose of the program we are about to create is to sharpen up our image-manipulation skills. Some of you may never have worked with images before, but that's okay. This tutorial is still a good thinking exercise, and it will come in handy if you ever find yourself needing to create or manipulate images using PHP.
Because of the complexity of the task at hand, we’re going to break this article into two separate pieces. The first part, as you’re about to see, will give an overview of our project and then jump right into setting up our conversion class. We’ll create several basic accessor methods, and we’ll also tackle the issue of cross-browser compatibility with the help of a little CSS.
Part two will then pick up where we left off and spend most of the remainder of our time working on the actual conversion process itself.