GD Basics

The GD module is available on every platform where Perl is available. Several versions of Perl come with GD as a standard part of the Perl distribution, such as the ActiveState Win32 port and the MacPerl port. Installation methods vary from platform to platform, but if you’ve ever successfully installed a Perl module on your system, you shouldn’t have a problem installing GD.

GD requires several components, all of which are freely available. They are:

The GD module

To download the latest version of GD, check CPAN first via http://www.cpan.org. The latest version of GD.pm should also be available at http://stein.cshl.org.

Thomas Boutell’s libgd C library

This can be found at http://www.boutell.com/gd/. Version 1.8.3 or higher is required.

Support libraries

Most of these packages use the GNU autoconf tools for configuring and compiling the source code. The order of installation should be:

  1. Install the supporting libraries. Be sure to install the include files as well as the libraries themselves. All of the support libraries except libpng are optional.

  2. Install libgd. You need to edit some options in the Makefile if you want to include support for TrueType fonts.

  3. Install the ...

Get Perl Graphics Programming 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.