GD

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN


3. On darwin, you can use these package managers to resolve dependencies and
build libgd:

        i.  MacPorts http://www.macports.org/
	ii. Homebrew http://mxcl.github.io/homebrew/

If this module fails to compile and link, you are probably using an
older version of libgd.  Symptoms of this problem include errors about
functions not being recognized in the gd.h header file, and undefined
symbols from the linker.  If you are having this type of error, please
REMOVE all versions of libgd, gd.h from your system and reinstall
libgd 2.0.28 or higher.  Do not contact Lincoln for help until you
have done this.

Use GD 1.41 for libgd versions 1.8.4 and lower.

3.  Unpack the tar file:

	zcat GD-2.XX.tar.gz | tar xvf -

    (Where "XX" is the most recent revision number.)  This will create
    the directory GD-2.XX.

4.  To compile GD.pm:

	a.  cd GD-2.XX
	b.  perl Makefile.PL
	c.  make
        d.  make test
	f.  sudo make install

    This will create GD.pm and install it into
    the system-wide Perl library directory.  You'll need root
    privileges to do the install step.  If you don't have them, see below.

    During step (b), Makefile.PL will look for the program gdlib-config or gdlib.pc
    that newer versions of libgd install for you.  If this program is not present, the
    Makefile.PL script will ask you whether to build support for
    JPEG, FreeType and/or XPM image formats.  Please answer "y" (the default) 
    if libgd was built with the feature, and "n" if it was not.  Failure
    to answer correctly will lead to link errors.

    If, during step (b) you see notes about missing libraries, then this
    module will probably not link correctly, even though the warning may say
    "probably harmless".    

5.  Before you install GD, you will want to run the regression tests.  You
    can do this after the "make" step by typing:

	make test

6.  There are some demos you can run in ext/GD/demos.  They print PNG
    files to standard output.  To view the files, pipe their
    output to "display" or "xv" in this way:

	a.  cd GD-2.XX/demos
	b   perl shapes.pl | display -

    You will need a graphics program that can read and display PNG
    format.  I recommend Image::Magick's display program, available from
    ftp://ftp.wizards.dupont.com/pub/ImageMagick/
    If you don't have any display programs handy, you can save to a
    temporary file and display with recent versions of Netscape or
    Internet Explorer.

7.  A program named fonttest is included in this package under demos.  This 
    generates an image showing all the built-in fonts available.  If you have
    built libgd with TrueType support, and you have a directory containing
    some TrueType fonts, you can create a simple font listing by running
    the program truetype_test, also located in demos.

8.  See demos/gd_example.cgi for an example of how to use GD to create
    a picture dynamically with a CGI script.  It's intended to be run
    under a Web server.  To see it work, install it in your server's
    cgi-bin/ directory and invoke it from a browser by fetching a URL like:

	http://your.site/cgi-bin/gd_example.cgi

IF YOU RUN INTO PROBLEMS

If the make and install all seem to go well but you get errors like
"Fatal error: can't load module GD.so", or "Fatal error: unknown
symbol gdFontSmall" when you try to run a script that uses GD, you may
have problems with dynamic linking.  Check whether other
dynamically-linked Perl modules such as POSIX and DB_File run
correctly.  If not, then you'll have to link Perl statically, as
described above.  Other problems may be fixed by compiling libgd as a
shared library, as described in step (2) of the installation
instructions.

If you are trying to compile and link GD on a Windows or Macintosh
machine and fail, please verify that you are able to build the Perl
distribution from source code.  If you can't do that, then you don't
have the compiler/linker/make tools required for building Perl
modules.  You may not even need to do this, as ActiveState and MacPerl
both include precompiled versions of GD.

If you have problems and can't solve it on your own, post a message to
the newsgroup "comp.lang.perl.modules".  There are some systems that
require obscure compiler and linker options in order to compile
correctly, and unfortunately I have a limited number of systems at my
disposal.  You're much more likely to get correct answers from the
gurus on the newsgroup than from myself.

THE GD::SIMPLE LIBRARY

GD::Simple is a simplified API for GD. It supports turtle graphics, a
unified interface for drawing text, and symbolic color names (like
"green").  Run "perldoc GD::Simple" for information on using it.

The GD::SVG LIBRARY

GD::SVG, which is available separately on CPAN, provides a subset of
GD method calls. For this subset, you can create images in SVG
(scalable vector graphics) format.

THE QUICKDRAW LIBRARY

This is no longer supported.



( run in 1.426 second using v1.01-cache-2.11-cpan-39bf76dae61 )