Commits

Anonymous committed e3866d2

- remove files not present in 2.0.33

Comments (0)

Files changed (51)

src/AUTHORS

-
-  Credits and license terms
-  
-   In order to resolve any possible confusion regarding the authorship of
-   gd, the following copyright statement covers all of the authors who
-   have required such a statement. _If you are aware of any oversights in
-   this copyright notice, please contact Thomas Boutell who will be
-   pleased to correct them._
-
-COPYRIGHT STATEMENT FOLLOWS THIS LINE
-
-     Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, by Cold
-     Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the
-     National Institutes of Health.
-     
-     Portions copyright 1996, 1997, 1998, 1999, by Boutell.Com, Inc.
-     
-     Portions relating to GD2 format copyright 1999 Philip Warner.
-     
-     Portions relating to PNG copyright 1999, Greg Roelofs.
-     
-     Portions relating to libttf copyright 1999, John Ellson
-     (ellson@lucent.com).
-     
-     _Permission has been granted to copy and distribute gd in any
-     context, including a commercial application, provided that this
-     notice is present in user-accessible supporting documentation._
-     
-     This does not affect your ownership of the derived work itself, and
-     the intent is to assure proper credit for the authors of gd, not to
-     interfere with your productive use of gd. If you have questions,
-     ask. "Derived works" includes all programs that utilize the
-     library. Credit must be given in user-accessible documentation.
-     
-     Permission to use, copy, modify, and distribute this software and
-     its documentation for any purpose and without fee is hereby
-     granted, provided that the above copyright notice appear in all
-     copies and that both that copyright notice and this permission
-     notice appear in supporting documentation. This software is
-     provided "as is" without express or implied warranty.
-     
-     Although their code does not appear in gd 1.6.2, the authors wish
-     to thank David Koblas, David Rowley, and Hutchison Avenue Software
-     Corporation for their prior contributions.
-     
-     Permission to use, copy, modify, and distribute this software and
-     its documentation for any purpose and without fee is hereby
-     granted, provided that the above copyright notice appear in all
-     copies and that both that copyright notice and this permission
-     notice appear in supporting documentation. _This software is
-     provided "AS IS."_ The copyright holders disclaim all warranties,
-     either express or implied, including but not limited to implied
-     warranties of merchantability and fitness for a particular purpose,
-     with respect to this code and accompanying documentation.
-     
-END OF COPYRIGHT STATEMENT
-

src/ChangeLog

-990923 Thomas Boutell (TBB)
-	- I forgot to include -lz in the suggested library list
-	  for those with truetype and xpm support. Thanks to
-	  Masahito Yamaga.
-990922 Thomas Boutell (TBB)
-	- autoconf/automake removed in favor of an improved Makefile.
-	  I was getting unbelievable amounts of confused email.
-	- Documentation updates.
-	- ANSI C correctness.
-990729 Thomas Boutell (TBB)
-	- It would probably be a good idea to free the 
-	  png_write_struct, wouldn't it.
-990727 Thomas Boutell (TBB)
-	- Sorted out -lm problem that prevented PNG library
-	  from being correctly detected or flagged as absent
-	- Got rid of unneeded Makefiles in test directory
-	- No version number change (no code changes)
-990721 Philip Warner (pjw)
-	- Added gdImageCompare
-	- Various fixes, including bottom line of polygon
-990720 Thomas Boutell (TBB)
-	- Removed automatic allocation of variably sized array 
-          from gdImagePngCtx, replaced with malloc call
-
-990720 Greg Roelofs
-        - Another new version of gd_png.c, with additional fixes
- 
-990720 John Ellson (ellson@lucent.com)
-	- converted to GNU autoconf/automake/libtool
-	- added functions: gdImageStringTTF  gdImageColorResolve
-	- added source files: gdttf.c gdcache.c gdcche.h gdtestttf.c
-	- modified source files: gd.c gd.h
-	- renamed:  HISTORY -> ChangeLog
-	            readme.txt -> README
-	- updated docs: index.html, README
-	All changes should be fully backward compatible with gd1.6.1
-	If libttf is not found by configure then gdImageStringTTF is a stub.
-
-990718 Thomas Boutell (TBB)
-
-Incorporated Greg Roelofs' superior PNG read and write routines.
-
-990715 Thomas Boutell (TBB)
-
-Removed all GIF capability in favor of PNG
-in order to remove any possible LZW patent concerns.
-
-990701 Philip Warner (pjw) as documented by TBB
-
-Implemented gdImageSink (missing in initial 1.5 release),
-renamed all new source files to have a gd_ prefix.
-
-990628 Thomas Boutell (TBB)
-
-Removed all C++ style comments for broader compatibility.
-
-990310 Philip Warner (pjw)
---------------------------
-
-Broke gd.c into multiple files; gd.c now has graphics operations, and gd_<zzz> has specific
-support for different formats (eg. GD, GD2, GIF).
-
-Restructured I/O so that reading from files/streams/anything is now possible. All handled
-through the IOCtx record which must define some basic I/O services. All services are defined
-for files, but only some are defined for in-memory pointers. The in-memory pointer 
-implementation is primarily for Perl compatibility. Changed basically involved writing some 
-low level IO routines, and relpacing most FILE* variables with IOCtx*.
-
-Added gdImageGdPtr, gdImageGd2Ptr, gdImageGifPtr, gdImageLzwPtr for Perl compatibility.
-
-Broke up the GIF handling routines; gd_gif_in.c does all GIF input (this did not change when
-support for LZW compression was removed). gd_gif_out.c not handles the miGif compression that
-was introduced in version 1.3
-
-Reinstated LZW support through the gdImageLzw function (defined in gd_lzw_out.c). 
-This is NOT built by default, and the header file must be modified to include it in the build.
-
-Added 'GD2' support. This is a zlib-compressed internal format useful for extracting portions
-of images without having to read entire image files. Informal tests suggest it is only 30% slower
-than the old GD format, and file space requirements are similar to GOF. The GD2 header fields 
-now contain version information, so the format can probably be considered stable across versions.
-
-Various other functions also added (see index.html).
-
-Informal Tests
---------------
-
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-23 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-19 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-33 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-65 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-16 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-59 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-71 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-70 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-86 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-160 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ls -lrt t*.gd2
--rw-r--r--   1 pjw      users     1363301 Mar 10 12:03 t512.gd2
--rw-r--r--   1 pjw      users     1339003 Mar 10 12:06 t256.gd2
--rw-r--r--   1 pjw      users     1323925 Mar 10 12:09 t128.gd2
--rw-r--r--   1 pjw      users     1492096 Mar 10 12:12 t064.gd2
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-2 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-15 seconds to extract (& destroy) 100 times
-

src/HISTORY

-990718 Thomas Boutell (TBB)
-
-Incorporated Greg Roelofs' superior PNG read and write routines.
-
-990715 Thomas Boutell (TBB)
-
-Removed all GIF capability in favor of PNG
-in order to remove any possible LZW patent concerns.
-
-990701 Philip Warner (pjw) as documented by TBB
-
-Implemented gdImageSink (missing in initial 1.5 release),
-renamed all new source files to have a gd_ prefix.
-
-990628 Thomas Boutell (TBB)
-
-Removed all C++ style comments for broader compatibility.
-
-990310 Philip Warner (pjw)
---------------------------
-
-Broke gd.c into multiple files; gd.c now has graphics operations, and gd_<zzz> has specific
-support for different formats (eg. GD, GD2, GIF).
-
-Restructured I/O so that reading from files/streams/anything is now possible. All handled
-through the IOCtx record which must define some basic I/O services. All services are defined
-for files, but only some are defined for in-memory pointers. The in-memory pointer 
-implementation is primarily for Perl compatibility. Changed basically involved writing some 
-low level IO routines, and relpacing most FILE* variables with IOCtx*.
-
-Added gdImageGdPtr, gdImageGd2Ptr, gdImageGifPtr, gdImageLzwPtr for Perl compatibility.
-
-Broke up the GIF handling routines; gd_gif_in.c does all GIF input (this did not change when
-support for LZW compression was removed). gd_gif_out.c not handles the miGif compression that
-was introduced in version 1.3
-
-Reinstated LZW support through the gdImageLzw function (defined in gd_lzw_out.c). 
-This is NOT built by default, and the header file must be modified to include it in the build.
-
-Added 'GD2' support. This is a zlib-compressed internal format useful for extracting portions
-of images without having to read entire image files. Informal tests suggest it is only 30% slower
-than the old GD format, and file space requirements are similar to GOF. The GD2 header fields 
-now contain version information, so the format can probably be considered stable across versions.
-
-Various other functions also added (see index.html).
-
-Informal Tests
---------------
-
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-23 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-19 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-33 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-65 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-16 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-59 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-71 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-70 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-86 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-160 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ls -lrt t*.gd2
--rw-r--r--   1 pjw      users     1363301 Mar 10 12:03 t512.gd2
--rw-r--r--   1 pjw      users     1339003 Mar 10 12:06 t256.gd2
--rw-r--r--   1 pjw      users     1323925 Mar 10 12:09 t128.gd2
--rw-r--r--   1 pjw      users     1492096 Mar 10 12:12 t064.gd2
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-2 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-15 seconds to extract (& destroy) 100 times
-

src/Makefile

-#Depending on your system and the libraries and features you have
-#and want, you WILL need to modify this Makefile!
-
-#If you do not have gcc, change the setting for COMPILER, but you must
-#use an ANSI standard C compiler (NOT the old SunOS 4.1.3 cc
-#compiler; get gcc if you are still using that). 
-COMPILER=gcc
-
-#If the ar command fails on your system, consult the ar manpage
-#for your system. 
-AR=ar
-
-#Typical configuration: support for PNG images, JPEG images, and FreeType text.
-#Remove -DHAVE_LIBFREETYPE if you can live without FreeType text.
-#Add -DHAVE_XPM if you have X and xpm installed and you want that feature.
-
-CFLAGS=-g -DHAVE_LIBPNG -DHAVE_LIBJPEG -DHAVE_LIBFREETYPE
-
-#PLEASE NOTE: YOU MAY HAVE TO JUGGLE THE ORDER OF THE LIBRARIES.
-#Some systems are very picky about link order. They don't all agree
-#on the right order, either. 
-#
-#Best for most users. If you don't have FreeType, remove -lfreetype.
-#Add -lxpm if you need XPM support.
-
-LIBS=-lgd -lpng -lz -ljpeg -lfreetype -lm
-
-#Typical install locations for freetype 2.0, zlib, xpm, libjpeg 
-#and libpng header files. If yours are somewhere else, change this. 
-#-I. is important to ensure that the version of gd you are installing 
-#is used, and not an older release in your directory tree somewhere.
-
-INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include 
-
-#Typical install locations for freetype, zlib, xpm and libpng libraries.
-#If yours are somewhere else, other than a standard location
-#such as /lib or /usr/lib, then change this. This line shouldn't hurt 
-#if you don't actually have some of the optional libraries and directories.
-LIBDIRS=-L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib
-
-#Location where libgd.so should be installed by "make install".
-#THIS MUST BE ONE OF YOUR STANDARD SHARED LIBRARY LOCATIONS, unless
-#you add a new directory to your LD_LIBRARY_PATH environment setting.
-#Otherwise applications will NOT find libgd.so and will produce an 
-#error.  
-INSTALL_LIB=/usr/lib
-
-#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/include
-
-#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
-
-#
-#
-# Changes should not be required below here.
-#
-#
-
-# Update these with each release!
-
-MAJOR_VERSION=2
-VERSION=2.0.0
-
-CC=$(COMPILER) $(INCLUDEDIRS)
-LINK=$(CC) $(LIBDIRS) $(LIBS)
-
-PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
-
-BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng
-TEST_PROGRAMS=gdtest gddemo gd2time gdtestft testac
-
-default: instructions
-
-instructions:
-	@echo First, edit this Makefile. Read the comments at
-	@echo the beginning thoroughly.
-	@echo
-	@echo Second, type \'make install\' as root.
-	@echo
-	@echo This installs the GD ${VERSION} shared library,
-	@echo which is required in order to use the included
-	@echo utility programs, such as webpng, pngtogd, etc.
-	@echo 
-	@echo OPTIONAL third step: type \'make test\' to build 
-	@echo the optional test programs. Type \'make install\' FIRST.
-
-test: $(TEST_PROGRAMS)
-
-install: libgd.so.${VERSION} $(BIN_PROGRAMS)
-	sh ./install-item 755 pngtogd $(INSTALL_BIN)/pngtogd
-	sh ./install-item 755 pngtogd2 $(INSTALL_BIN)/pngtogd2
-	sh ./install-item 755 gdtopng $(INSTALL_BIN)/gdtopng
-	sh ./install-item 755 gd2topng $(INSTALL_BIN)/gd2topng
-	sh ./install-item 755 gd2copypal $(INSTALL_BIN)/gd2copypal
-	sh ./install-item 755 gdparttopng $(INSTALL_BIN)/gdparttopng
-	sh ./install-item 755 webpng $(INSTALL_BIN)/webpng
-	sh ./install-item 755 bdftogd $(INSTALL_BIN)/bdftogd
-	sh ./install-item 644 gd.h $(INSTALL_INCLUDE)/gd.h
-	sh ./install-item 644 gdcache.h $(INSTALL_INCLUDE)/gdcache.h
-	sh ./install-item 644 gd_io.h $(INSTALL_INCLUDE)/gd_io.h
-	sh ./install-item 644 gdfontg.h $(INSTALL_INCLUDE)/gdfontg.h
-	sh ./install-item 644 gdfontl.h $(INSTALL_INCLUDE)/gdfontl.h
-	sh ./install-item 644 gdfontmb.h $(INSTALL_INCLUDE)/gdfontmb.h
-	sh ./install-item 644 gdfonts.h $(INSTALL_INCLUDE)/gdfonts.h
-	sh ./install-item 644 gdfontt.h $(INSTALL_INCLUDE)/gdfontt.h
-
-gddemo: gddemo.o
-	$(CC) gddemo.o -o gddemo	$(LIBDIRS) $(LIBS)
-
-testac: testac.o
-	$(CC) testac.o -o testac	$(LIBDIRS) $(LIBS)
-
-pngtogd: pngtogd.o
-	$(CC) pngtogd.o -o pngtogd	$(LIBDIRS) $(LIBS) 
-
-webpng: webpng.o
-	$(CC) webpng.o -o webpng	$(LIBDIRS) $(LIBS)
-
-pngtogd2: pngtogd2.o
-	$(CC) pngtogd2.o -o pngtogd2	$(LIBDIRS) $(LIBS)
-
-gdtopng: gdtopng.o
-	$(CC) gdtopng.o -o gdtopng	$(LIBDIRS) $(LIBS)
-
-gd2topng: gd2topng.o
-	$(CC) gd2topng.o -o gd2topng	$(LIBDIRS) $(LIBS)
-
-gd2copypal: gd2copypal.o
-	$(CC) gd2copypal.o -o gd2copypal	$(LIBDIRS) $(LIBS)
-
-gdparttopng: gdparttopng.o
-	$(CC) gdparttopng.o -o gdparttopng	$(LIBDIRS) $(LIBS)
-
-gdtest: gdtest.o
-	$(CC) gdtest.o -o gdtest	$(LIBDIRS) $(LIBS)
-
-gd2time: gd2time.o
-	$(CC) gd2time.o -o gd2time	$(LIBDIRS) $(LIBS)
-
-gdtestft: gdtestft.o
-	$(CC) --verbose gdtestft.o -o gdtestft $(LIBDIRS) $(LIBS)
-
-LIBOBJS=gd.o gd_gd.o gd_gd2.o gd_io.o gd_io_dp.o \
-		gd_io_file.o gd_ss.o gd_io_ss.o gd_png.o gd_jpeg.o gdxpm.o \
-		gdfontt.o gdfonts.o gdfontmb.o gdfontl.o gdfontg.o \
-		gdtables.o gdft.o gdcache.o gdkanji.o wbmp.o \
-		gd_wbmp.o gdhelpers.o gd_topal.o 
-
-#Shared library. This should work fine on any ELF platform (Linux, etc.) with
-#GNU ld or something similarly intelligent. To avoid the chicken-and-egg
-#problem, this target also installs the library so that applications can
-#actually find it.
-
-libgd.so.${VERSION}: ${LIBOBJS}
-	-rm -f libgd.so.${VERSION} 2>/dev/null
-	ld -shared -o libgd.so.${VERSION} ${LIBOBJS}
-	sh ./install-item 644 libgd.so.${VERSION} \
-		$(INSTALL_LIB)/libgd.so.${VERSION}
-	-rm $(INSTALL_LIB)/libgd.so.${MAJOR_VERSION} 2>/dev/null
-	ln -s $(INSTALL_LIB)/libgd.so.${VERSION} \
-		$(INSTALL_LIB)/libgd.so.${MAJOR_VERSION}	
-	-rm $(INSTALL_LIB)/libgd.so 2>/dev/null
-	ln -s $(INSTALL_LIB)/libgd.so.${VERSION} \
-		$(INSTALL_LIB)/libgd.so	
-
-#Static library, if you really need one for some reason.
-libgd.a: ${LIBOBJS}
-	rm -f libgd.a
-	$(AR) rc libgd.a ${LIBOBJS}
-	-ranlib libgd.a
-
-clean:
-	rm -f *.o *.a *.so ${PROGRAMS} test/gdtest.jpg test/gdtest.wbmp
-

src/Makefile.nt

-#NMAKE makefile for Windows 95/98/NT developers.
-#Produces a static library (libgd.lib). Thanks to Joe Gregorio.
-#THIS IS OUT OF DATE.
-
-COMPILER=cl
-
-#If the ar command fails on your system, consult the ar manpage
-#for your system. 
-AR=LIB
-
-#If the install command is not in your path, provide
-#an explicit path for it here, or install manually.
-INSTALL=install
-
-#If you don't have FreeType and/or Xpm installed, including the
-#header files, uncomment this (default).
-CFLAGS=-Ox -GX 
-
-#If you do have FreeType and/or Xpm fully installed, uncomment a
-#variation of this and comment out the line above. See also LIBS below.
-#CFLAGS=-O -DHAVE_LIBXPM -DHAVE_LIBJPEG -DHAVE_LIBPNG -DHAVE_LIBTTF
-
-# -DHAVE_LIBFREETYPE can be used instead of -DHAVE_TTF to use the
-# newer FreeType2 libraries
-
-#Libraries required for applications 
-LIBS=gd.lib libpng.lib zlib.lib 
-#LIBS=gd.lib libpng.lib zlib.lib libjpeg.lib libttf.lib
-
-#Libraries required for gd.lib itself
-GDLIBS=libpng.lib zlib.lib
-#GDLIBS=libpng.lib zlib.lib libjpeg.lib libttf.lib
-
-#Typical install locations for freetype, zlib, jpeg, xpm and 
-#libpng header files. If yours are somewhere else, change this. 
-INCLUDEDIRS=-I d:\zlib -I d:\libpng -I d:\libjpeg -I d:\libttf
-
-#Typical install locations for freetype, zlib, xpm, libjpeg and 
-#libpng libraries.
-#
-#If yours are somewhere else, other than a standard location
-#such as /lib or /usr/lib, then change this. Be sure to keep
-#-L. as this allows the gd library itself to be found.
-#Put -L. first so that old versions of the gd library elsewhere
-#on your system can't cause conflicts while building a new one.
-LIB=d:\devstudio\vc\lib;d:\zlib;d:\libpng;d:\libjpeg;d:\libttf
-
-#Location where gd.lib should be installed by "make install".
-INSTALL_LIB=/usr/local/lib
-
-#Location where .h files should be installed by "make install".
-INSTALL_INCLUDE=/usr/local/include
-
-#Location where useful non-test programs should be installed by "make install".
-INSTALL_BIN=/usr/local/bin
-
-#
-#
-# Changes should not be required below here.
-#
-#
-
-VERSION=1.8.1
-
-CC=$(COMPILER) $(INCLUDEDIRS)
-LINK=$(CC) $(LIBS)
-
-PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
-
-BIN_PROGRAMS=pngtogd.exe pngtogd2.exe gdtopng.exe gd2topng.exe gd2copypal.exe gdparttopng.exe webpng.exe
-TEST_PROGRAMS=gdtest.exe gddemo.exe gd2time.exe gdtestttf.exe gdtestft.exe
-
-all: gd.lib $(PROGRAMS)
-
-gddemo.exe: gddemo.c gd.lib
-	$(CC) gddemo.c $(LIBDIRS) $(LIBS)
-
-pngtogd.exe: pngtogd.c gd.lib
-	$(CC) pngtogd.c $(LIBDIRS) $(LIBS) 
-
-webpng.exe: webpng.c gd.lib
-	$(CC) webpng.c 	$(LIBDIRS) $(LIBS)
-
-pngtogd2.exe: pngtogd2.c gd.lib
-	$(CC) pngtogd2.c	$(LIBDIRS) $(LIBS)
-
-gdtopng.exe: gdtopng.c gd.lib
-	$(CC) gdtopng.c 	$(LIBDIRS) $(LIBS)
-
-gd2topng.exe: gd2topng.c gd.lib
-	$(CC) gd2topng.c	$(LIBDIRS) $(LIBS)
-
-gd2copypal.exe: gd2copypal.c gd.lib
-	$(CC) gd2copypal.c	$(LIBDIRS) $(LIBS)
-
-gdparttopng.exe: gdparttopng.c gd.lib
-	$(CC) gdparttopng.c	$(LIBDIRS) $(LIBS)
-
-gdtest.exe: gdtest.c gd.lib
-	$(CC) gdtest.c 	$(LIBDIRS) $(LIBS)
-
-gd2time.exe: gd2time.c gd.lib
-	$(CC) gd2time.c	$(LIBDIRS) $(LIBS)
-
-gdtestttf.exe: gdtestttf.c gd.lib
-	$(CC) gdtestttf.c 	$(LIBDIRS) $(LIBS)
-
-gdtestft.exe: gdtestft.c gd.lib
-	$(CC) gdtestft.c 	$(LIBDIRS) $(LIBS)
-
-OBJS=gd.obj gd_gd.obj gd_gd2.obj gd_io.obj gd_io_dp.obj gd_io_file.obj gd_ss.obj \
-	gd_io_ss.obj gd_png.obj gdxpm.obj gdfontt.obj gdfonts.obj gdfontmb.obj gdfontl.obj \
-	gdfontg.obj gdtables.obj gdttf.obj gdft.c gdcache.obj gdkanji.obj gd_jpeg.obj
-
-gd.lib:  $(OBJS) gd.h gdfontt.h gdfonts.h gdfontmb.h gdfontl.h gdfontg.h	
-	$(AR) $(OBJS) $(GDLIBS) 
-
-clean:
-	del *.obj *.lib $(PROGRAMS)
-

src/NEWS

-990729 Thomas Boutell (TBB)
-	- It would probably be a good idea to free the 
-	  png_write_struct, wouldn't it.
-990727 Thomas Boutell (TBB)
-	- Sorted out -lm problem that prevented PNG library
-	  from being correctly detected or flagged as absent
-	- Got rid of unneeded Makefiles in test directory
-	- No version number change (no code changes)
-990721 Philip Warner (pjw)
-	- Added gdImageCompare
-	- Various fixes, including bottom line of polygon
-990720 Thomas Boutell (TBB)
-	- Removed automatic allocation of variably sized array 
-          from gdImagePngCtx, replaced with malloc call
-
-990720 Greg Roelofs
-        - Another new version of gd_png.c, with additional fixes
- 
-990720 John Ellson (ellson@lucent.com)
-	- converted to GNU autoconf/automake/libtool
-	- added functions: gdImageStringTTF  gdImageColorResolve
-	- added source files: gdttf.c gdcache.c gdcche.h gdtestttf.c
-	- modified source files: gd.c gd.h
-	- renamed:  HISTORY -> ChangeLog
-	            readme.txt -> README
-	- updated docs: index.html, README
-	All changes should be fully backward compatible with gd1.6.1
-	If libttf is not found by configure then gdImageStringTTF is a stub.
-
-990718 Thomas Boutell (TBB)
-
-Incorporated Greg Roelofs' superior PNG read and write routines.
-
-990715 Thomas Boutell (TBB)
-
-Removed all GIF capability in favor of PNG
-in order to remove any possible LZW patent concerns.
-
-990701 Philip Warner (pjw) as documented by TBB
-
-Implemented gdImageSink (missing in initial 1.5 release),
-renamed all new source files to have a gd_ prefix.
-
-990628 Thomas Boutell (TBB)
-
-Removed all C++ style comments for broader compatibility.
-
-990310 Philip Warner (pjw)
---------------------------
-
-Broke gd.c into multiple files; gd.c now has graphics operations, and gd_<zzz> has specific
-support for different formats (eg. GD, GD2, GIF).
-
-Restructured I/O so that reading from files/streams/anything is now possible. All handled
-through the IOCtx record which must define some basic I/O services. All services are defined
-for files, but only some are defined for in-memory pointers. The in-memory pointer 
-implementation is primarily for Perl compatibility. Changed basically involved writing some 
-low level IO routines, and relpacing most FILE* variables with IOCtx*.
-
-Added gdImageGdPtr, gdImageGd2Ptr, gdImageGifPtr, gdImageLzwPtr for Perl compatibility.
-
-Broke up the GIF handling routines; gd_gif_in.c does all GIF input (this did not change when
-support for LZW compression was removed). gd_gif_out.c not handles the miGif compression that
-was introduced in version 1.3
-
-Reinstated LZW support through the gdImageLzw function (defined in gd_lzw_out.c). 
-This is NOT built by default, and the header file must be modified to include it in the build.
-
-Added 'GD2' support. This is a zlib-compressed internal format useful for extracting portions
-of images without having to read entire image files. Informal tests suggest it is only 30% slower
-than the old GD format, and file space requirements are similar to GOF. The GD2 header fields 
-now contain version information, so the format can probably be considered stable across versions.
-
-Various other functions also added (see index.html).
-
-Informal Tests
---------------
-
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-23 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-19 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-33 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 400 300
-Extracting 100 times from (3000, 2000), size is 400x300
-65 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-8 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-16 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 200 100
-Extracting 100 times from (3000, 2000), size is 200x100
-59 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-71 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-70 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-86 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 800 600
-Extracting 100 times from (3000, 2000), size is 800x600
-160 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ls -lrt t*.gd2
--rw-r--r--   1 pjw      users     1363301 Mar 10 12:03 t512.gd2
--rw-r--r--   1 pjw      users     1339003 Mar 10 12:06 t256.gd2
--rw-r--r--   1 pjw      users     1323925 Mar 10 12:09 t128.gd2
--rw-r--r--   1 pjw      users     1492096 Mar 10 12:12 t064.gd2
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t064.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t128.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-2 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t256.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-4 seconds to extract (& destroy) 100 times
-pjw@Acheron:/home/pjw/work/gd1.3pjw > ./gd2time t512.gd2 100 3000 2000 50 25
-Extracting 100 times from (3000, 2000), size is 50x25
-15 seconds to extract (& destroy) 100 times
-

src/README

-                    THERE IS A BETTER MANUAL IN index.html.
-                    THERE IS A BETTER MANUAL IN index.html.
-                    THERE IS A BETTER MANUAL IN index.html.
-                    THERE IS A BETTER MANUAL IN index.html.
-
-                                   gd 1.6.3
-                                       
-A graphics library for fast image creation
-
-Follow this link to the latest version of this document.
-
-     _HEY! READ THIS!_ gd 1.6.3 creates PNG images, not GIF images. This
-     is a good thing. PNG is a more compact format, and full compression
-     is available. Existing code will need modification to call
-     gdImagePng instead of gdImageGif. _Please do not ask us to send you
-     the old GIF version of GD._ Unisys holds a patent on the LZW
-     compression algorithm, which is used in fully compressed GIF
-     images. We are still investigating the legal issues surrounding
-     various alternative means of producing a valid GIF file.
-     
-     gd 1.6.3 _requires_ that the following libraries also be installed:
-     
-     libpng
-     
-     zlib
-     
-     Please read the documentation and install the required libraries.
-     Do not send email asking why png.h is not found. See the
-     requirements section for more information. Thank you!
-     
-  Table of Contents
-  
-     * Credits and license terms
-     * What's new in version 1.6.3?
-     * What's new in version 1.6.2?
-     * What's new in version 1.6.1?
-     * What's new in version 1.6?
-     * What is gd?
-     * What if I want to use another programming language?
-     * What else do I need to use gd?
-     * How do I get gd?
-     * How do I build gd?
-     * gd basics: using gd in your program
-     * webpng: a useful example
-     * Function and type reference by category
-     * About the additional .gd image file format
-     * Please tell us you're using gd!
-     * If you have problems
-     * Alphabetical quick index
-       
-   Up to the Boutell.Com, Inc. Home Page
-   
-  Credits and license terms
-  
-   In order to resolve any possible confusion regarding the authorship of
-   gd, the following copyright statement covers all of the authors who
-   have required such a statement. _If you are aware of any oversights in
-   this copyright notice, please contact Thomas Boutell who will be
-   pleased to correct them._
-
-COPYRIGHT STATEMENT FOLLOWS THIS LINE
-
-     Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, by Cold
-     Spring Harbor Laboratory. Funded under Grant P41-RR02188 by the
-     National Institutes of Health.
-     
-     Portions copyright 1996, 1997, 1998, 1999, by Boutell.Com, Inc.
-     
-     Portions relating to GD2 format copyright 1999 Philip Warner.
-     
-     Portions relating to PNG copyright 1999, Greg Roelofs.
-     
-     Portions relating to libttf copyright 1999, John Ellson
-     (ellson@lucent.com).
-     
-     _Permission has been granted to copy and distribute gd in any
-     context without fee, including a commercial application, provided
-     that this notice is present in user-accessible supporting
-     documentation._
-     
-     This does not affect your ownership of the derived work itself, and
-     the intent is to assure proper credit for the authors of gd, not to
-     interfere with your productive use of gd. If you have questions,
-     ask. "Derived works" includes all programs that utilize the
-     library. Credit must be given in user-accessible documentation.
-     
-     _This software is provided "AS IS."_ The copyright holders disclaim
-     all warranties, either express or implied, including but not
-     limited to implied warranties of merchantability and fitness for a
-     particular purpose, with respect to this code and accompanying
-     documentation.
-     
-     Although their code does not appear in gd 1.6.3, the authors wish
-     to thank David Koblas, David Rowley, and Hutchison Avenue Software
-     Corporation for their prior contributions.
-     
-END OF COPYRIGHT STATEMENT
-
-  What is gd?
-  
-   gd is a graphics library. It allows your code to quickly draw images
-   complete with lines, arcs, text, multiple colors, cut and paste from
-   other images, and flood fills, and write out the result as a .PNG
-   file. This is particularly useful in World Wide Web applications,
-   where .PNG is one of the formats accepted for inline images by most
-   browsers.
-   
-   gd is not a paint program. If you are looking for a paint program, you
-   are looking in the wrong place. If you are not a programmer, you are
-   looking in the wrong place.
-   
-   gd does not provide for every possible desirable graphics operation.
-   It is not necessary or desirable for gd to become a kitchen-sink
-   graphics package, but version 1.6.3 incorporates most of the commonly
-   requested features for an 8-bit 2D package. Support for scalable
-   fonts, and truecolor images, JPEG and truecolor PNG is planned for
-   version 2.0.
-   
-  What if I want to use another programming language?
-  
-    Perl
-    
-   gd can also be used from Perl, courtesy of Lincoln Stein's GD.pm
-   library, which uses gd as the basis for a set of Perl 5.x classes. Not
-   yet updated for gd 1.6.3.
-   
-    Tcl
-    
-   gd can be used from Tcl with John Ellson's Gdtclft dynamically loaded
-   extension package. (Gdtclft2.0 or later is needed for gd-1.6.3 with
-   PNG output.)
-   
-    Any Language
-    
-   There are, at the moment, at least three simple interpreters that
-   perform gd operations. You can output the desired commands to a simple
-   text file from whatever scripting language you prefer to use, then
-   invoke the interpreter.
-   
-   These packages have not been updated to gd 1.6.3 as of this writing.
-     * tgd, by Bradley K. Sherman
-     * fly, by Martin Gleeson
-       
-  What's new in version 1.6.3?
-  
-   Version 1.6.3 corrects a memory leak in gd_png.c. This leak caused a
-   significant amount of memory to be allocated and not freed when
-   writing a PNG image.
-   
-  What's new in version 1.6.2?
-  
-   Version 1.6.2 from John Ellson adds two new functions:
-     * gdImageStringTTF - scalable, rotatable, anti-aliased, TrueType
-       strings using the FreeType library, but only if libttf is found by
-       configure. _We do not provide TrueType fonts. Obtaining them is
-       entirely up to you._
-     * gdImageColorResolve - an efficient alternative for the common code
-       fragment:
-
-
-      if ((color=gdImageColorExact(im,R,G,B)) < 0)
-          if ((color=gdImageColorAllocate(im,R,G,B)) < 0)
-              color=gdImageColorClosest(im,R,G,B);
-
-   Also in this release the build process has been converted to GNU
-   autoconf/automake/libtool conventions so that both (or either) static
-   and shared libraries can be built.
-   
-  What's new in version 1.6.1?
-  
-   Version 1.6.1 incorporates superior PNG reading and writing code from
-   Greg Roelofs, with minor modifications by Tom Boutell. Specifically, I
-   altered his code to read non-palette images (converting them to
-   palette images badly, by dithering them), and to tolerate palette
-   images with types of transparency that gd doesn't actually support (it
-   just ignores the advanced transparency features). Any bugs in this
-   area are therefore my fault, not Greg's.
-   
-   Unlike gd 1.6, users should have no trouble linking with gd 1.6.1 if
-   they follow the instructions and install all of the pieces. However,
-   _If you get undefined symbol errors, be sure to check for older
-   versions of libpng in your library directories!_
-   
-  What's new in version 1.6?
-  
-   Version 1.6 features the following changes:
-   
-   _Support for 8-bit palette PNG images has been added. Support for GIF
-   has been removed._ This step was taken to completely avoid the legal
-   controversy regarding the LZW compression algorithm used in GIF.
-   Unisys holds a patent which is relevant to LZW compression. PNG is a
-   superior image format in any case. Now that PNG is supported by both
-   Microsoft Internet Explorer and Netscape (in their recent releases),
-   we highly recommend that GD users upgrade in order to get
-   well-compressed images in a format which is legally unemcumbered.
-   
-  What's new in version 1.5?
-  
-   Version 1.5 featured the following changes:
-   
-   _New GD2 format_
-          An improvement over the GD format, the GD2 format uses the zlib
-          compression library to compress the image in chunks. This
-          results in file sizes comparable to GIFs, with the ability to
-          access parts of large images without having to read the entire
-          image into memory.
-          
-          This format also supports version numbers and rudimentary
-          validity checks, so it should be more 'supportable' than the
-          previous GD format.
-          
-   _Re-arranged source files_
-          gd.c has been broken into constituant parts: io, gif, gd, gd2
-          and graphics functions are now in separate files.
-          
-   _Extended I/O capabilities._
-          The source/sink feature has been extended to support GD2 file
-          formats (which require seek/tell functions), and to allow more
-          general non-file I/O.
-          
-   _Better support for Lincoln Stein's Perl Module_
-          The new gdImage*Ptr function returns the chosen format stored
-          in a block of memory. This can be directly used by the GD perl
-          module.
-          
-   _Added functions_
-          gdImageCreateFromGd2Part - allows retrieval of part of an image
-          (good for huge images, like maps),
-          gdImagePaletteCopy - Copies a palette from one image to
-          another, doing it's best to match the colors in the target
-          image to the colors in the source palette.
-          gdImageGd2, gdImageCreateFromGd2 - Support for new format
-          gdImageCopyMerge - Merges two images (useful to highlight part
-          of an image)
-          gdImageCopyMergeGray - Similar to gdImageCopyMerge, but tries
-          to preserve source image hue.
-          gdImagePngPtr, gdImageGdPtr, gdImageGd2Ptr - return memort
-          blocks for each type of image.
-          gdImageCreateFromPngCtx, gdImageCreateFromGdCtx,
-          gdImageCreateFromGd2Ctx, gdImageCreateFromGd2PartCtx - Support
-          for new I/O context.
-          
-   _NOTE:_ In fairness to Thomas Boutell, any bug/problems with any of
-   the above features should probably be reported to Philip Warner.
-   
-  What's new in version 1.4?
-  
-   Version 1.4 features the following changes:
-   
-   Fixed polygon fill routine (again)
-          Thanks to Kirsten Schulz, version 1.4 is able to fill numerous
-          types of polygons that caused problems with previous releases,
-          including version 1.3.
-          
-   Support for alternate data sources
-          Programmers who wish to load a GIF from something other than a
-          stdio FILE * stream can use the new gdImageCreateFromPngSource
-          function.
-          
-   Support for alternate data destinations
-          Programmers who wish to write a GIF to something other than a
-          stdio FILE * stream can use the new gdImagePngToSink function.
-          
-   More tolerant when reading GIFs
-          Version 1.4 does not crash when reading certain animated GIFs,
-          although it still only reads the first frame. Version 1.4 also
-          has overflow testing code to prevent crashes when reading
-          damaged GIFs.
-          
-  What's new in version 1.3?
-  
-   Version 1.3 features the following changes:
-   
-   Non-LZW-based GIF compression code
-          Version 1.3 contained GIF compression code that uses simple Run
-          Length Encoding instead of LZW compression, while still
-          retaining compatibility with normal LZW-based GIF decoders
-          (your browser will still like your GIFs). _LZW compression is
-          patented by Unisys. We are currently reevaluating the approach
-          taken by gd 1.3. The current release of gd does not support
-          this approach. We recommend that you use the current release,
-          and generate PNG images._ Thanks to Hutchison Avenue Software
-          Corporation for contributing the RLE GIF code.
-          
-   8-bit fonts, and 8-bit font support
-          This improves support for European languages. Thanks are due to
-          Honza Pazdziora and also to Jan Pazdziora . Also see the
-          provided bdftogd Perl script if you wish to convert fixed-width
-          X11 fonts to gd fonts.
-          
-   16-bit font support (no fonts provided)
-          Although no such fonts are provided in the distribution, fonts
-          containing more than 256 characters should work if the
-          gdImageString16 and gdImageStringUp16 routines are used.
-          
-   Improvements to the "webpng" example/utility
-          The "webpng" utility is now a slightly more useful application.
-          Thanks to Brian Dowling for this code.
-          
-   Corrections to the color resolution field of GIF output
-          Thanks to Bruno Aureli.
-          
-   Fixed polygon fills
-          A one-line patch for the infamous polygon fill bug, courtesy of
-          Jim Mason. I believe this fix is sufficient. However, if you
-          find a situation where polygon fills still fail to behave
-          properly, please send code that demonstrates the problem, _and_
-          a fix if you have one. Verifying the fix is important.
-          
-   Row-major, not column-major
-          Internally, gd now represents the array of pixels as an array
-          of rows of pixels, rather than an array of columns of pixels.
-          This improves the performance of compression and decompression
-          routines slightly, because horizontally adjacent pixels are now
-          next to each other in memory. _This should not affect properly
-          written gd applications, but applications that directly
-          manipulate the pixels array will require changes._
-          
-  What else do I need to use gd?
-  
-   To use gd, you will need an ANSI C compiler. _All popular Windows 95
-   and NT C compilers are ANSI C compliant._ Any full-ANSI-standard C
-   compiler should be adequate. _The cc compiler released with SunOS
-   4.1.3 is not an ANSI C compiler. Most Unix users who do not already
-   have gcc should get it. gcc is free, ANSI compliant and a de facto
-   industry standard. Ask your ISP why it is missing._
-   
-   As of version 1.6, you also need the zlib compression library, and the
-   libpng library. As of version 1.6.2, you can draw text using
-   antialiased TrueType fonts if you also have the libttf library
-   installed, but this is not mandatory. zlib is available for a variety
-   of platforms from the zlib web site. libpng is available for a variety
-   of platforms from the PNG web site.
-   
-   You will also want a PNG viewer, if you do not already have one for
-   your system, since you will need a good way to check the results of
-   your work. Netscape 4.04 and higher, and Microsoft Internet Explorer
-   4.0 or higher, both support PNG. For some purposes you might be
-   happier with a package like Lview Pro for Windows or xv for X. There
-   are PNG viewers available for every graphics-capable modern operating
-   system, so consult newsgroups relevant to your particular system.
-   
-  How do I get gd?
-  
-    By HTTP
-    
-     * Gzipped Tar File (Unix)
-     * .ZIP File (Windows)
-       
-    By FTP
-    
-     * Gzipped Tar File (Unix)
-     * .ZIP File (Windows)
-       
-  How do I build gd?
-  
-   In order to build gd, you must first unpack the archive you have
-   downloaded. If you are not familiar with tar and gunzip (Unix) or ZIP
-   (Windows), please consult with an experienced user of your system.
-   Sorry, we cannot answer questions about basic Internet skills.
-   
-   Unpacking the archive will produce a directory called "gd-1.6.3".
-   
-    For Unix
-    
-   cd to the gd-1.6.3 directory and type "./configure", followed by
-   "make". If you are the system administrator, and you wish to make the
-   gd library available to other programs, you may also wish to type
-   "make install".
-   
-    For Windows, Mac, Et Cetera
-    
-   Create a project using your favorite programming environment. Copy all
-   of the gd files to the project directory. Add gd.c to your project.
-   Add other source files as appropriate. Learning the basic skills of
-   creating projects with your chosen C environment is up to you.
-   
-   You have now built both the gd library and a demonstration program
-   which shows off the capabilities of gd. To see it in action, type
-   "gddemo".
-   
-   gddemo should execute without incident, creating the file demoout.png.
-   (Note there is also a file named demoin.png, which is provided in the
-   package as part of the demonstration.)
-   
-   Display demoout.png in your PNG viewer. The image should be 128x128
-   pixels and should contain an image of the space shuttle with quite a
-   lot of graphical elements drawn on top of it.
-   
-   (If you are missing the demoin.png file, the other items should appear
-   anyway.)
-   
-   Look at demoin.png to see the original space shuttle image which was
-   scaled and copied into the output image.
-   
-  gd basics: using gd in your program
-  
-   gd lets you create PNG images on the fly. To use gd in your program,
-   include the file gd.h, and link with the libgd.a library produced by
-   "make libgd.a", under Unix. Under other operating systems you will add
-   gd.c to your own project.
-   
-   If you want to use the provided fonts, include gdfontt.h, gdfonts.h,
-   gdfontmb.h, gdfontl.h and/or gdfontg.h. For more impressive results,
-   install libttf and use the new gdImageStringTTF function. If you are
-   not using the provided Makefile and/or a library-based approach, be
-   sure to include the source modules as well in your project. (They may
-   be too large for 16-bit memory models, that is, 16-bit DOS and
-   Windows.)
-   
-   Here is a short example program. _(For a more advanced example, see
-   gddemo.c, included in the distribution. gddemo.c is NOT the same
-   program; it demonstrates additional features!)_
-   
-/* Bring in gd library functions */
-#include "gd.h"
-
-/* Bring in standard I/O so we can output the PNG to a file */
-#include <stdio.h>
-
-int main() {
-        /* Declare the image */
-        gdImagePtr im;
-        /* Declare an output file */
-        FILE *out;
-        /* Declare color indexes */
-        int black;
-        int white;
-
-        /* Allocate the image: 64 pixels across by 64 pixels tall */
-        im = gdImageCreate(64, 64);
-
-        /* Allocate the color black (red, green and blue all minimum).
-                Since this is the first color in a new image, it will
-                be the background color. */
-        black = gdImageColorAllocate(im, 0, 0, 0);
-
-        /* Allocate the color white (red, green and blue all maximum). */
-        white = gdImageColorAllocate(im, 255, 255, 255);
-        
-        /* Draw a line from the upper left to the lower right,
-                using white color index. */
-        gdImageLine(im, 0, 0, 63, 63, white);
-
-        /* Open a file for writing. "wb" means "write binary", important
-                under MSDOS, harmless under Unix. */
-        out = fopen("test.png", "wb");
-
-        /* Output the image to the disk file. */
-        gdImagePng(im, out);
-
-        /* Close the file. */
-        fclose(out);
-
-        /* Destroy the image in memory. */
-        gdImageDestroy(im);
-}
-
-   When executed, this program creates an image, allocates two colors
-   (the first color allocated becomes the background color), draws a
-   diagonal line (note that 0, 0 is the upper left corner), writes the
-   image to a PNG file, and destroys the image.
-   
-   The above example program should give you an idea of how the package
-   works. gd provides many additional functions, which are listed in the
-   following reference chapters, complete with code snippets
-   demonstrating each. There is also an alphabetical index.
-   
-  Webpng: a more powerful gd example
-  
-   Webpng is a simple utility program to manipulate PNGs from the command
-   line. It is written for Unix and similar command-line systems, but
-   should be easily adapted for other environments. Webpng allows you to
-   set transparency and interlacing and output interesting information
-   about the PNG in question.
-   
-   webpng.c is provided in the distribution. Unix users can simply type
-   "make webpng" to compile the program. Type "webpng" with no arguments
-   to see the available options.
-   
-Function and type reference
-
-     * Types
-     * Image creation, destruction, loading and saving
-     * Drawing, styling, brushing, tiling and filling functions
-     * Query functions (not color-related)
-     * Font and text-handling functions
-     * Color handling functions
-     * Copying and resizing functions
-     * Miscellaneous Functions
-     * Constants
-       
-  Types
-  
-   gdImage_(TYPE)_
-          The data structure in which gd stores images. gdImageCreate
-          returns a pointer to this type, and the other functions expect
-          to receive a pointer to this type as their first argument. You
-          may read the members sx (size on X axis), sy (size on Y axis),
-          colorsTotal (total colors), red (red component of colors; an
-          array of 256 integers between 0 and 255), green (green
-          component of colors, as above), blue (blue component of colors,
-          as above), and transparent (index of transparent color, -1 if
-          none); please do so using the macros provided. Do NOT set the
-          members directly from your code; use the functions provided.
-          
-
-typedef struct {
-        unsigned char ** pixels;
-        int sx;
-        int sy;
-        int colorsTotal;
-        int red[gdMaxColors];
-        int green[gdMaxColors];
-        int blue[gdMaxColors];
-        int open[gdMaxColors];
-        int transparent;
-} gdImage;
-
-   gdImagePtr _(TYPE)_
-          A pointer to an image structure. gdImageCreate returns this
-          type, and the other functions expect it as the first argument.
-          
-   gdFont _(TYPE)_
-          A font structure. Used to declare the characteristics of a
-          font. Plese see the files gdfontl.c and gdfontl.h for an
-          example of the proper declaration of this structure. You can
-          provide your own font data by providing such a structure and
-          the associated pixel array. You can determine the width and
-          height of a single character in a font by examining the w and h
-          members of the structure. If you will not be creating your own
-          fonts, you will not need to concern yourself with the rest of
-          the components of this structure.
-          
-
-typedef struct {
-        /* # of characters in font */
-        int nchars;
-        /* First character is numbered... (usually 32 = space) */
-        int offset;
-        /* Character width and height */
-        int w;
-        int h;
-        /* Font data; array of characters, one row after another.
-                Easily included in code, also easily loaded from
-                data files. */
-        char *data;
-} gdFont;
-
-   gdFontPtr _(TYPE)_
-          A pointer to a font structure. Text-output functions expect
-          these as their second argument, following the gdImagePtr
-          argument. Two such pointers are declared in the provided
-          include files gdfonts.h and gdfontl.h.
-          
-   gdPoint _(TYPE)_
-          Represents a point in the coordinate space of the image; used
-          by gdImagePolygon and gdImageFilledPolygon.
-          
-
-typedef struct {
-        int x, y;
-} gdPoint, *gdPointPtr;
-
-   gdPointPtr _(TYPE)_
-          A pointer to a gdPoint structure; passed as an argument to
-          gdImagePolygon and gdImageFilledPolygon.
-          
-   gdSource _(TYPE)_
-
-typedef struct {
-        int (*source) (void *context, char *buffer, int len);
-        void *context;
-} gdSource, *gdSourcePtr;
-
-   Represents a source from which a PNG can be read. Programmers who do
-   not wish to read PNGs from a file can provide their own alternate
-   input mechanism, using the gdImageCreateFromPngSource function. See
-   the documentation of that function for an example of the proper use of
-   this type.
-   
-   gdSink _(TYPE)_
-
-typedef struct {
-        int (*sink) (void *context, char *buffer, int len);
-        void *context;
-} gdSink, *gdSinkPtr;
-
-   Represents a "sink" (destination) to which a PNG can be written.
-   Programmers who do not wish to write PNGs to a file can provide their
-   own alternate output mechanism, using the gdImagePngToSink function.
-   See the documentation of that function for an example of the proper
-   use of this type.
-   
-  Image creation, destruction, loading and saving
-  
-   gdImageCreate(sx, sy) _(FUNCTION)_
-          gdImageCreate is called to create images. Invoke gdImageCreate
-          with the x and y dimensions of the desired image. gdImageCreate
-          returns a gdImagePtr to the new image, or NULL if unable to
-          allocate the image. The image must eventually be destroyed
-          using gdImageDestroy().
-          
-
-... inside a function ...
-gdImagePtr im;
-im = gdImageCreate(64, 64);
-/* ... Use the image ... */
-gdImageDestroy(im);
-
-   gdImageCreateFromPng(FILE *in) _(FUNCTION)_
-          gdImageCreateFromPngCtx(gdIOCtx *in) _(FUNCTION)_
-          
-          
-          gdImageCreateFromPng is called to load images from PNG format
-          files. Invoke gdImageCreateFromPng with an already opened
-          pointer to a file containing the desired image.
-          gdImageCreateFromPng returns a gdImagePtr to the new image, or
-          NULL if unable to load the image (most often because the file
-          is corrupt or does not contain a PNG image).
-          gdImageCreateFromPng does _not_ close the file. You can inspect
-          the sx and sy members of the image to determine its size. The
-          image must eventually be destroyed using gdImageDestroy().
-          
-
-gdImagePtr im;
-... inside a function ...
-FILE *in;
-in = fopen("mypng.png", "rb");
-im = gdImageCreateFromPng(in);
-fclose(in);
-/* ... Use the image ... */
-gdImageDestroy(im);
-
-   gdImageCreateFromPngSource(gdSourcePtr in) _(FUNCTION)_
-          gdImageCreateFromPngSource is called to load a PNG from a data
-          source other than a file. Usage is very similar to the
-          gdImageCreateFromPng function, except that the programmer
-          provides a custom data source.
-          
-          The programmer must write an input function which accepts a
-          context pointer, a buffer, and a number of bytes to be read as
-          arguments. This function must read the number of bytes
-          requested, unless the end of the file has been reached, in
-          which case the function should return zero, or an error has
-          occurred, in which case the function should return -1. The
-          programmer then creates a gdSource structure and sets the
-          source pointer to the input function and the context pointer to
-          any value which is useful to the programmer.
-          
-          The example below implements gdImageCreateFromPng by creating a
-          custom data source and invoking gdImageCreateFromPngSource.
-          
-
-static int freadWrapper(void *context, char *buf, int len);
-
-gdImagePtr gdImageCreateFromPng(FILE *in)
-{
-        gdSource s;
-        s.source = freadWrapper;
-        s.context = in;
-        return gdImageCreateFromPngSource(&s);
-}
-
-static int freadWrapper(void *context, char *buf, int len)
-{
-        int got = fread(buf, 1, len, (FILE *) context);
-        return got;
-}
-
-   gdImageCreateFromGd(FILE *in) _(FUNCTION)_
-          gdImageCreateFromGdCtx(gdIOCtx *in) _(FUNCTION)_
-          
-          
-          gdImageCreateFromGd is called to load images from gd format
-          files. Invoke gdImageCreateFromGd with an already opened
-          pointer to a file containing the desired image in the gd file
-          format, which is specific to gd and intended for very fast
-          loading. (It is _not_ intended for compression; for
-          compression, use PNG.) gdImageCreateFromGd returns a gdImagePtr
-          to the new image, or NULL if unable to load the image (most
-          often because the file is corrupt or does not contain a gd
-          format image). gdImageCreateFromGd does _not_ close the file.
-          You can inspect the sx and sy members of the image to determine
-          its size. The image must eventually be destroyed using
-          gdImageDestroy().
-          
-
-... inside a function ...
-gdImagePtr im;
-FILE *in;
-in = fopen("mygd.gd", "rb");
-im = gdImageCreateFromGd(in);
-fclose(in);
-/* ... Use the image ... */
-gdImageDestroy(im);
-
-   gdImageCreateFromGd2(FILE *in) _(FUNCTION)_
-          gdImageCreateFromGd2Ctx(gdIOCtx *in) _(FUNCTION)_
-          
-          
-          gdImageCreateFromGd2 is called to load images from gd2 format
-          files. Invoke gdImageCreateFromGd2 with an already opened
-          pointer to a file containing the desired image in the gd2 file
-          format, which is specific to gd2 and intended for fast loading
-          of parts of large images. (It is a compressed format, but
-          generally not as good a LZW compression). gdImageCreateFromGd
-          returns a gdImagePtr to the new image, or NULL if unable to
-          load the image (most often because the file is corrupt or does
-          not contain a gd format image). gdImageCreateFromGd2 does _not_
-          close the file. You can inspect the sx and sy members of the
-          image to determine its size. The image must eventually be
-          destroyed using gdImageDestroy().
-          
-
-... inside a function ...
-gdImagePtr im;
-FILE *in;
-in = fopen("mygd.gd2", "rb");
-im = gdImageCreateFromGd2(in);
-fclose(in);
-/* ... Use the image ... */
-gdImageDestroy(im);
-
-   gdImageCreateFromGd2Part(FILE *in, int srcX, int srcY, int w, int h)
-          _(FUNCTION)_
-          gdImageCreateFromGd2PartCtx(gdIOCtx *in) _(FUNCTION)_
-          
-          
-          gdImageCreateFromGd2Part is called to load parts of images from
-          gd2 format files. Invoked in the same way as
-          gdImageCreateFromGd2, but with extra parameters indicating the
-          source (x, y) and width/height of the desired image.
-          gdImageCreateFromGd2Part returns a gdImagePtr to the new image,
-          or NULL if unable to load the image. The image must eventually
-          be destroyed using gdImageDestroy().
-          
-   gdImageCreateFromXbm(FILE *in) _(FUNCTION)_
-          gdImageCreateFromXbm is called to load images from X bitmap
-          format files. Invoke gdImageCreateFromXbm with an already
-          opened pointer to a file containing the desired image.
-          gdImageCreateFromXbm returns a gdImagePtr to the new image, or
-          NULL if unable to load the image (most often because the file
-          is corrupt or does not contain an X bitmap format image).
-          gdImageCreateFromXbm does _not_ close the file. You can inspect
-          the sx and sy members of the image to determine its size. The
-          image must eventually be destroyed using gdImageDestroy().
-          
-
-... inside a function ...
-gdImagePtr im;
-FILE *in;
-in = fopen("myxbm.xbm", "rb");
-im = gdImageCreateFromXbm(in);
-fclose(in);
-/* ... Use the image ... */
-gdImageDestroy(im);
-
-   gdImageDestroy(gdImagePtr im) _(FUNCTION)_
-          gdImageDestroy is used to free the memory associated with an
-          image. It is important to invoke gdImageDestroy before exiting
-          your program or assigning a new image to a gdImagePtr variable.
-          
-
-... inside a function ...
-gdImagePtr im;
-im = gdImageCreate(10, 10);
-/* ... Use the image ... */
-/* Now destroy it */
-gdImageDestroy(im);
-
-   void gdImagePng(gdImagePtr im, FILE *out) _(FUNCTION)_
-          gdImagePng outputs the specified image to the specified file in
-          PNG format. The file must be open for writing. Under MSDOS and
-          all versions of Windows, it is important to use "wb" as opposed
-          to simply "w" as the mode when opening the file, and under Unix
-          there is no penalty for doing so. gdImagePng does _not_ close
-          the file; your code must do so.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black, white;
-FILE *out;
-/* Create the image */
-im = gdImageCreate(100, 100);
-/* Allocate background */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate drawing color */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Draw rectangle */
-gdImageRectangle(im, 0, 0, 99, 99, black);
-/* Open output file in binary mode */
-out = fopen("rect.png", "wb");
-/* Write PNG */
-gdImagePng(im, out);
-/* Close file */
-fclose(out);
-/* Destroy image */
-gdImageDestroy(im);
-
-   void* gdImagePngPtr(gdImagePtr im, int *size) _(FUNCTION)_
-          Identical to gdImagePng except that it returns a pointer to a
-          memory area with the PNG data. This memory must be freed by the
-          caller when it is no longer needed. The 'size' parameter
-          received the total size of the block of memory.
-          
-   gdImagePngToSink(gdImagePtr im, gdSinkPtr out) _(FUNCTION)_
-          gdImagePngToSink is called to write a PNG to a data "sink"
-          (destination) other than a file. Usage is very similar to the
-          gdImagePng function, except that the programmer provides a
-          custom data sink.
-          
-          The programmer must write an output function which accepts a
-          context pointer, a buffer, and a number of bytes to be written
-          as arguments. This function must write the number of bytes
-          requested and return that number, unless an error has occurred,
-          in which case the function should return -1. The programmer
-          then creates a gdSink structure and sets the sink pointer to
-          the output function and the context pointer to any value which
-          is useful to the programmer.
-          
-          The example below implements gdImagePng by creating a custom
-          data source and invoking gdImagePngFromSink.
-          
-
-static int stdioSink(void *context, char *buffer, int len)
-{
-        return fwrite(buffer, 1, len, (FILE *) context);
-}
-
-void gdImagePng(gdImagePtr im, FILE *out)
-{
-        gdSink mySink;
-        mySink.context = (void *) out;
-        mySink.sink = stdioSink;
-        gdImagePngToSink(im, &mySink);
-}
-
-   void gdImageGd(gdImagePtr im, FILE *out) _(FUNCTION)_
-          gdImageGd outputs the specified image to the specified file in
-          the gd image format. The file must be open for writing. Under
-          MSDOS and all versions of Windows, it is important to use "wb"
-          as opposed to simply "w" as the mode when opening the file, and
-          under Unix there is no penalty for doing so. gdImagePng does
-          _not_ close the file; your code must do so.
-          
-          The gd image format is intended for fast reads and writes of
-          images your program will need frequently to build other images.
-          It is _not_ a compressed format, and is not intended for
-          general use.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black, white;
-FILE *out;
-/* Create the image */
-im = gdImageCreate(100, 100);
-/* Allocate background */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate drawing color */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Draw rectangle */
-gdImageRectangle(im, 0, 0, 99, 99, black);
-/* Open output file in binary mode */
-out = fopen("rect.gd", "wb");
-/* Write gd format file */
-gdImageGd(im, out);
-/* Close file */
-fclose(out);
-/* Destroy image */
-gdImageDestroy(im);
-
-   void* gdImageGdPtr(gdImagePtr im, int *size) _(FUNCTION)_
-          Identical to gdImageGd except that it returns a pointer to a
-          memory area with the GD data. This memory must be freed by the
-          caller when it is no longer needed. The 'size' parameter
-          received the total size of the block of memory.
-          
-   void gdImageGd2(gdImagePtr im, FILE *out, int chunkSize, int fmt)
-          _(FUNCTION)_
-          gdImageGd2 outputs the specified image to the specified file in
-          the gd2 image format. The file must be open for writing. Under
-          MSDOS and all versions of Windows, it is important to use "wb"
-          as opposed to simply "w" as the mode when opening the file, and
-          under Unix there is no penalty for doing so. gdImageGd2 does
-          _not_ close the file; your code must do so.
-          
-          The gd2 image format is intended for fast reads and writes of
-          parts of images. It is a compressed format, and well suited to
-          retrieving smll sections of much larger images. The third and
-          fourth parameters are the 'chunk size' and format
-          resposectively.
-          
-          The file is stored as a series of compressed subimages, and the
-          _Chunk Size_ determines the sub-image size - a value of zero
-          causes the GD library to use the default.
-          
-          It is also possible to store GD2 files in an uncompressed
-          format, in which case the fourth parameter should be
-          GD2_FMT_RAW.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black, white;
-FILE *out;
-/* Create the image */
-im = gdImageCreate(100, 100);
-/* Allocate background */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate drawing color */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Draw rectangle */
-gdImageRectangle(im, 0, 0, 99, 99, black);
-/* Open output file in binary mode */
-out = fopen("rect.gd", "wb");
-/* Write gd2 format file */
-gdImageGd2(im, out, 0, GD2_FMT_COMPRESSED);
-/* Close file */
-fclose(out);
-/* Destroy image */
-gdImageDestroy(im);
-
-   void* gdImageGd2Ptr(gdImagePtr im, int chunkSize, int fmt, int *size)
-          _(FUNCTION)_
-          Identical to gdImageGd2 except that it returns a pointer to a
-          memory area with the GD2 data. This memory must be freed by the
-          caller when it is no longer needed. The 'size' parameter
-          received the total size of the block of memory.
-          
-  Drawing Functions
-  
-   void gdImageSetPixel(gdImagePtr im, int x, int y, int color)
-          _(FUNCTION)_
-          gdImageSetPixel sets a pixel to a particular color index.
-          Always use this function or one of the other drawing functions
-          to access pixels; do not access the pixels of the gdImage
-          structure directly.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Set a pixel near the center. */
-gdImageSetPixel(im, 50, 50, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int
-          color) _(FUNCTION)_
-          gdImageLine is used to draw a line between two endpoints (x1,y1
-          and x2, y2). The line is drawn using the color index specified.
-          Note that the color index can be an actual color returned by
-          gdImageColorAllocate or one of gdStyled, gdBrushed or
-          gdStyledBrushed.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Draw a line from the upper left corner to the lower right corner. */
-gdImageLine(im, 0, 0, 99, 99, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2,
-          int color) _(FUNCTION)_
-          gdImageDashedLine is provided _solely for backwards
-          compatibility _with gd 1.0. New programs should draw dashed
-          lines using the normal gdImageLine function and the new
-          gdImageSetStyle function.
-          
-          gdImageDashedLine is used to draw a dashed line between two
-          endpoints (x1,y1 and x2, y2). The line is drawn using the color
-          index specified. The portions of the line that are not drawn
-          are left transparent so the background is visible.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Draw a dashed line from the upper left corner to the lower right corner. */
-gdImageDashedLine(im, 0, 0, 99, 99);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImagePolygon(gdImagePtr im, gdPointPtr points, int pointsTotal,
-          int color) _(FUNCTION)_
-          gdImagePolygon is used to draw a polygon with the verticies (at
-          least 3) specified, using the color index specified. See also
-          gdImageFilledPolygon.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-/* Points of polygon */
-gdPoint points[3];
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Draw a triangle. */
-points[0].x = 50;
-points[0].y = 0;
-points[1].x = 99;
-points[1].y = 99;
-points[2].x = 0;
-points[2].y = 99;
-gdImagePolygon(im, points, 3, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2,
-          int color) _(FUNCTION)_
-          gdImageRectangle is used to draw a rectangle with the two
-          corners (upper left first, then lower right) specified, using
-          the color index specified.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Draw a rectangle occupying the central area. */
-gdImageRectangle(im, 25, 25, 74, 74, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageFilledPolygon(gdImagePtr im, gdPointPtr points, int
-          pointsTotal, int color) _(FUNCTION)_
-          gdImageFilledPolygon is used to fill a polygon with the
-          verticies (at least 3) specified, using the color index
-          specified. See also gdImagePolygon.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-int red;
-/* Points of polygon */
-gdPoint points[3];
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate the color red. */
-red = gdImageColorAllocate(im, 255, 0, 0);
-/* Draw a triangle. */
-points[0].x = 50;
-points[0].y = 0;
-points[1].x = 99;
-points[1].y = 99;
-points[2].x = 0;
-points[2].y = 99;
-/* Paint it in white */
-gdImageFilledPolygon(im, points, 3, white);
-/* Outline it in red; must be done second */
-gdImagePolygon(im, points, 3, red);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageFilledRectangle(gdImagePtr im, int x1, int y1, int x2, int
-          y2, int color) _(FUNCTION)_
-          gdImageFilledRectangle is used to draw a solid rectangle with
-          the two corners (upper left first, then lower right) specified,
-          using the color index specified.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = int gdImageColorAllocate(im, 255, 255, 255);
-/* Draw a filled rectangle occupying the central area. */
-gdImageFilledRectangle(im, 25, 25, 74, 74, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s,
-          int e, int color) _(FUNCTION)_
-          gdImageArc is used to draw a partial ellipse centered at the
-          given point, with the specified width and height in pixels. The
-          arc begins at the position in degrees specified by s and ends
-          at the position specified by e. The arc is drawn in the color
-          specified by the last argument. A circle can be drawn by
-          beginning from 0 degrees and ending at 360 degrees, with width
-          and height being equal. e must be greater than s. Values
-          greater than 360 are interpreted modulo 360.
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 50);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Inscribe an ellipse in the image. */
-gdImageArc(im, 50, 25, 98, 48, 0, 360, white);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int
-          color) _(FUNCTION)_
-          gdImageFillToBorder floods a portion of the image with the
-          specified color, beginning at the specified point and stopping
-          at the specified border color. For a way of flooding an area
-          defined by the color of the starting point, see gdImageFill.
-          
-          The border color _cannot_ be a special color such as gdTiled;
-          it must be a proper solid color. The fill color can be,
-          however.
-          
-          Note that gdImageFillToBorder is recursive. It is not the most
-          naive implementation possible, and the implementation is
-          expected to improve, but there will always be degenerate cases
-          in which the stack can become very deep. This can be a problem
-          in MSDOS and MS Windows 3.1 environments. (Of course, in a Unix
-          or Windows 95/98/NT environment with a proper stack, this is
-          not a problem at all.)
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-int red;
-im = gdImageCreate(100, 50);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate the color red. */
-red = gdImageColorAllocate(im, 255, 0, 0);
-/* Inscribe an ellipse in the image. */
-gdImageArc(im, 50, 25, 98, 48, 0, 360, white);
-/* Flood-fill the ellipse. Fill color is red, border color is
-        white (ellipse). */
-gdImageFillToBorder(im, 50, 50, white, red);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageFill(gdImagePtr im, int x, int y, int color) _(FUNCTION)_
-          gdImageFill floods a portion of the image with the specified
-          color, beginning at the specified point and flooding the
-          surrounding region of the same color as the starting point. For
-          a way of flooding a region defined by a specific border color
-          rather than by its interior color, see gdImageFillToBorder.
-          
-          The fill color can be gdTiled, resulting in a tile fill using
-          another image as the tile. However, the tile image cannot be
-          transparent. If the image you wish to fill with has a
-          transparent color index, call gdImageTransparent on the tile
-          image and set the transparent color index to -1 to turn off its
-          transparency.
-          
-          Note that gdImageFill is recursive. It is not the most naive
-          implementation possible, and the implementation is expected to
-          improve, but there will always be degenerate cases in which the
-          stack can become very deep. This can be a problem in MSDOS and
-          MS Windows environments. (Of course, in a Unix or Windows
-          95/98/NT environment with a proper stack, this is not a problem
-          at all.)
-          
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-int red;
-im = gdImageCreate(100, 50);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-/* Allocate the color white (red, green and blue all maximum). */
-white = gdImageColorAllocate(im, 255, 255, 255);
-/* Allocate the color red. */
-red = gdImageColorAllocate(im, 255, 0, 0);
-/* Inscribe an ellipse in the image. */
-gdImageArc(im, 50, 25, 98, 48, 0, 360, white);
-/* Flood-fill the ellipse. Fill color is red, and will replace the
-        black interior of the ellipse. */
-gdImageFill(im, 50, 50, red);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-
-   void gdImageSetBrush(gdImagePtr im, gdImagePtr brush) _(FUNCTION)_
-          A "brush" is an image used to draw wide, shaped strokes in
-          another image. Just as a paintbrush is not a single point, a
-          brush image need not be a single pixel. _Any_ gd image can be
-          used as a brush, and by setting the transparent color index of
-          the brush image with gdImageColorTransparent, a brush of any
-          shape can be created. All line-drawing functions, such as
-          gdImageLine and gdImagePolygon, will use the current brush if
-          the special "color" gdBrushed or gdStyledBrushed is used when
-          calling them.
-          
-          gdImageSetBrush is used to specify the brush to be used in a
-          particular image. You can set any image to be the brush. If the
-          brush image does not have the same color map as the first
-          image, any colors missing from the first image will be
-          allocated. If not enough colors can be allocated, the closest
-          colors already available will be used. This allows arbitrary
-          PNGs to be used as brush images. It also means, however, that
-          you should not set a brush unless you will actually use it; if
-          you set a rapid succession of different brush images, you can
-          quickly fill your color map, and the results will not be
-          optimal.
-          
-          You need not take any special action when you are finished with
-          a brush. As for any other image, if you will not be using the
-          brush image for any further purpose, you should call
-          gdImageDestroy. You must not use the color gdBrushed if the
-          current brush has been destroyed; you can of course set a new
-          brush to replace it.
-          
-
-... inside a function ...
-gdImagePtr im, brush;
-FILE *in;
-int black;
-im = gdImageCreate(100, 100);
-/* Open the brush PNG. For best results, portions of the
-        brush that should be transparent (ie, not part of the
-        brush shape) should have the transparent color index. */
-in = fopen("star.png", "rb");
-brush = gdImageCreateFromPng(in);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-gdImageSetBrush(im, brush);
-/* Draw a line from the upper left corner to the lower right corner
-        using the brush. */
-gdImageLine(im, 0, 0, 99, 99, gdBrushed);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-/* Destroy the brush image */
-gdImageDestroy(brush);
-
-   void gdImageSetTile(gdImagePtr im, gdImagePtr tile) _(FUNCTION)_
-          A "tile" is an image used to fill an area with a repeated
-          pattern. _Any_ gd image can be used as a tile, and by setting
-          the transparent color index of the tile image with
-          gdImageColorTransparent, a tile that allows certain parts of
-          the underlying area to shine through can be created. All
-          region-filling functions, such as gdImageFill and
-          gdImageFilledPolygon, will use the current tile if the special
-          "color" gdTiled is used when calling them.
-          
-          gdImageSetTile is used to specify the tile to be used in a
-          particular image. You can set any image to be the tile. If the
-          tile image does not have the same color map as the first image,
-          any colors missing from the first image will be allocated. If
-          not enough colors can be allocated, the closest colors already
-          available will be used. This allows arbitrary PNGs to be used
-          as tile images. It also means, however, that you should not set
-          a tile unless you will actually use it; if you set a rapid
-          succession of different tile images, you can quickly fill your
-          color map, and the results will not be optimal.
-          
-          You need not take any special action when you are finished with
-          a tile. As for any other image, if you will not be using the
-          tile image for any further purpose, you should call
-          gdImageDestroy. You must not use the color gdTiled if the
-          current tile has been destroyed; you can of course set a new
-          tile to replace it.
-          
-
-... inside a function ...
-gdImagePtr im, tile;
-FILE *in;
-int black;
-im = gdImageCreate(100, 100);
-/* Open the tile PNG. For best results, portions of the
-        tile that should be transparent (ie, allowing the
-        background to shine through) should have the transparent
-        color index. */
-in = fopen("star.png", "rb");
-tile = gdImageCreateFromPng(in);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-gdImageSetTile(im, tile);
-/* Fill an area using the tile. */
-gdImageFilledRectangle(im, 25, 25, 75, 75, gdTiled);
-/* ... Do something with the image, such as saving it to a file... */
-/* Destroy it */
-gdImageDestroy(im);
-/* Destroy the tile image */
-gdImageDestroy(tile);
-
-   void gdImageSetStyle(gdImagePtr im, int *style, int styleLength)
-          _(FUNCTION)_
-          It is often desirable to draw dashed lines, dotted lines, and
-          other variations on a broken line. gdImageSetStyle can be used
-          to set any desired series of colors, including a special color
-          that leaves the background intact, to be repeated during the
-          drawing of a line.
-          
-          To use gdImageSetStyle, create an array of integers and assign
-          them the desired series of color values to be repeated. You can
-          assign the special color value gdTransparent to indicate that
-          the existing color should be left unchanged for that particular
-          pixel (allowing a dashed line to be attractively drawn over an
-          existing image).
-          
-          Then, to draw a line using the style, use the normal
-          gdImageLine function with the special color value gdStyled.
-          
-          As of version 1.1.1, the style array is copied when you set the
-          style, so you need not be concerned with keeping the array
-          around indefinitely. This should not break existing code that
-          assumes styles are not copied.
-          
-          You can also combine styles and brushes to draw the brush image
-          at intervals instead of in a continuous stroke. When creating a
-          style for use with a brush, the style values are interpreted
-          differently: zero (0) indicates pixels at which the brush
-          should not be drawn, while one (1) indicates pixels at which
-          the brush should be drawn. To draw a styled, brushed line, you
-          must use the special color value gdStyledBrushed. For an
-          example of this feature in use, see gddemo.c (provided in the
-          distribution).
-          
-
-gdImagePtr im;
-int styleDotted[2], styleDashed[6];
-FILE *in;
-int black;
-int red;
-im = gdImageCreate(100, 100);
-/* Background color (first allocated) */
-black = gdImageColorAllocate(im, 0, 0, 0);
-red = gdImageColorAllocate(im, 255, 0, 0);
-/* Set up dotted style. Leave every other pixel alone. */
-styleDotted[0] = red;
-styleDotted[1] = gdTransparent;
-/* Set up dashed style. Three on, three off. */
-styleDashed[0] = red;
-styleDashed[1] = red;
-styleDashed[2] = red;
-styleDashed[3] = gdTransparent;
-styleDashed[4] = gdTransparent;
-styleDashed[5] = gdTransparent;
-/* Set dotted style. Note that we have to specify how many pixels are
-        in the style! */
-gdImageSetStyle(im, styleDotted, 2);
-/* Draw a line from the upper left corner to the lower right corner. */
-gdImageLine(im, 0, 0, 99, 99, gdStyled);
-/* Now the dashed line. */
-gdImageSetStyle(im, styleDashed, 6);
-gdImageLine(im, 0, 99, 0, 99, gdStyled);
-
-/* ... Do something with the image, such as saving it to a file ... */
-
-/* Destroy it */
-gdImageDestroy(im);
-
-  Query Functions
-  
-        int gdImageBlue(gdImagePtr im, int color) _(MACRO)_
-                gdImageBlue is a macro which returns the blue component
-                of the specified color index. Use this macro rather than
-                accessing the structure members directly.
-                
-        int gdImageGetPixel(gdImagePtr im, int x, int y) _(FUNCTION)_
-                gdImageGetPixel() retrieves the color index of a
-                particular pixel. Always use this function to query
-                pixels; do not access the pixels of the gdImage structure
-                directly.
-                
-
-... inside a function ...
-FILE *in;
-gdImagePtr im;
-int c;
-in = fopen("mypng.png", "rb");
-im = gdImageCreateFromPng(in);
-fclose(in);
-c = gdImageGetPixel(im, gdImageSX(im) / 2, gdImageSY(im) / 2);
-printf("The value of the center pixel is %d; RGB values are %d,%d,%d\n",
-        c, im->red[c], im->green[c], im->blue[c]);
-gdImageDestroy(im);
-
-        int gdImageBoundsSafe(gdImagePtr im, int x, int y) _(FUNCTION)_
-                gdImageBoundsSafe returns true (1) if the specified point
-                is within the bounds of the image, false (0) if not. This
-                function is intended primarily for use by those who wish
-                to add functions to gd. All of the gd drawing functions
-                already clip safely to the edges of the image.
-                
-
-... inside a function ...
-gdImagePtr im;
-int black;
-int white;
-im = gdImageCreate(100, 100);
-if (gdImageBoundsSafe(im, 50, 50)) {
-        printf("50, 50 is within the image bounds\n");
-} else {
-        printf("50, 50 is outside the image bounds\n");
-}
-gdImageDestroy(im);
-
-        int gdImageGreen(gdImagePtr im, int color) _(MACRO)_
-                gdImageGreen is a macro which returns the green component
-                of the specified color index. Use this macro rather