Commits

Anonymous committed 0c31694

- sync to 2.0.29

Comments (0)

Files changed (8)

 
 SUBDIRS = config test
 
-bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng
+bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng gd2togif gdcmpgif giftogd2
 
 bin_SCRIPTS = bdftogd config/gdlib-config
 
-noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest testtr
+noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest testtr fontconfigtest gifanimtest
 
 EXTRA_DIST = README-JPEG.TXT README.TXT configure.pl bdftogd demoin.png err.out index.html install-item makefile.sample readme.jpn entities.html entities.tcl
 
 
 lib_LTLIBRARIES = libgd.la
 
-libgd_la_SOURCES = gd.c gdfx.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
+libgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
 
 libgd_la_LDFLAGS = -version-info 2:0:0
 
 
 SUBDIRS = config test
 
-bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng
+bin_PROGRAMS = annotate gdparttopng gdtopng gd2copypal gd2topng pngtogd pngtogd2 webpng gd2togif gdcmpgif giftogd2
 
 bin_SCRIPTS = bdftogd config/gdlib-config
 
-noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest testtr
+noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest testtr fontconfigtest gifanimtest
 
 EXTRA_DIST = README-JPEG.TXT README.TXT configure.pl bdftogd demoin.png err.out index.html install-item makefile.sample readme.jpn entities.html entities.tcl
 
 
 lib_LTLIBRARIES = libgd.la
 
-libgd_la_SOURCES = gd.c gdfx.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
+libgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
 
 libgd_la_LDFLAGS = -version-info 2:0:0
 
 LTLIBRARIES = $(lib_LTLIBRARIES)
 
 libgd_la_LIBADD =
-am_libgd_la_OBJECTS = gd.lo gdfx.lo gd_gd.lo gd_gd2.lo gd_io.lo \
-	gd_io_dp.lo gd_gif_in.lo gd_gif_out.lo gd_io_file.lo \
+am_libgd_la_OBJECTS = gd.lo gdfx.lo gd_security.lo gd_gd.lo gd_gd2.lo \
+	gd_io.lo gd_io_dp.lo gd_gif_in.lo gd_gif_out.lo gd_io_file.lo \
 	gd_io_ss.lo gd_jpeg.lo gd_png.lo gd_ss.lo gd_topal.lo \
 	gd_wbmp.lo gdcache.lo gdfontg.lo gdfontl.lo gdfontmb.lo \
 	gdfonts.lo gdfontt.lo gdft.lo gdhelpers.lo gdkanji.lo \
 libgd_la_OBJECTS = $(am_libgd_la_OBJECTS)
 bin_PROGRAMS = annotate$(EXEEXT) gdparttopng$(EXEEXT) gdtopng$(EXEEXT) \
 	gd2copypal$(EXEEXT) gd2topng$(EXEEXT) pngtogd$(EXEEXT) \
-	pngtogd2$(EXEEXT) webpng$(EXEEXT)
+	pngtogd2$(EXEEXT) webpng$(EXEEXT) gd2togif$(EXEEXT) \
+	gdcmpgif$(EXEEXT) giftogd2$(EXEEXT)
 noinst_PROGRAMS = fontsizetest$(EXEEXT) fontwheeltest$(EXEEXT) \
 	gdtest$(EXEEXT) gddemo$(EXEEXT) gd2time$(EXEEXT) \
 	gdtestft$(EXEEXT) testac$(EXEEXT) circletexttest$(EXEEXT) \
-	testtr$(EXEEXT)
+	testtr$(EXEEXT) fontconfigtest$(EXEEXT) gifanimtest$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
 annotate_SOURCES = annotate.c
 circletexttest_LDADD = $(LDADD)
 circletexttest_DEPENDENCIES = ./libgd.la
 circletexttest_LDFLAGS =
+fontconfigtest_SOURCES = fontconfigtest.c
+fontconfigtest_OBJECTS = fontconfigtest.$(OBJEXT)
+fontconfigtest_LDADD = $(LDADD)
+fontconfigtest_DEPENDENCIES = ./libgd.la
+fontconfigtest_LDFLAGS =
 fontsizetest_SOURCES = fontsizetest.c
 fontsizetest_OBJECTS = fontsizetest.$(OBJEXT)
 fontsizetest_LDADD = $(LDADD)
 gd2time_LDADD = $(LDADD)
 gd2time_DEPENDENCIES = ./libgd.la
 gd2time_LDFLAGS =
+gd2togif_SOURCES = gd2togif.c
+gd2togif_OBJECTS = gd2togif.$(OBJEXT)
+gd2togif_LDADD = $(LDADD)
+gd2togif_DEPENDENCIES = ./libgd.la
+gd2togif_LDFLAGS =
 gd2topng_SOURCES = gd2topng.c
 gd2topng_OBJECTS = gd2topng.$(OBJEXT)
 gd2topng_LDADD = $(LDADD)
 gd2topng_DEPENDENCIES = ./libgd.la
 gd2topng_LDFLAGS =
+gdcmpgif_SOURCES = gdcmpgif.c
+gdcmpgif_OBJECTS = gdcmpgif.$(OBJEXT)
+gdcmpgif_LDADD = $(LDADD)
+gdcmpgif_DEPENDENCIES = ./libgd.la
+gdcmpgif_LDFLAGS =
 gddemo_SOURCES = gddemo.c
 gddemo_OBJECTS = gddemo.$(OBJEXT)
 gddemo_LDADD = $(LDADD)
 gdtopng_LDADD = $(LDADD)
 gdtopng_DEPENDENCIES = ./libgd.la
 gdtopng_LDFLAGS =
+gifanimtest_SOURCES = gifanimtest.c
+gifanimtest_OBJECTS = gifanimtest.$(OBJEXT)
+gifanimtest_LDADD = $(LDADD)
+gifanimtest_DEPENDENCIES = ./libgd.la
+gifanimtest_LDFLAGS =
+giftogd2_SOURCES = giftogd2.c
+giftogd2_OBJECTS = giftogd2.$(OBJEXT)
+giftogd2_LDADD = $(LDADD)
+giftogd2_DEPENDENCIES = ./libgd.la
+giftogd2_LDFLAGS =
 pngtogd_SOURCES = pngtogd.c
 pngtogd_OBJECTS = pngtogd.$(OBJEXT)
 pngtogd_LDADD = $(LDADD)
 am__depfiles_maybe = depfiles
 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/annotate.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/circletexttest.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/fontconfigtest.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/fontsizetest.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/fontwheeltest.Po ./$(DEPDIR)/gd.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gd2copypal.Po ./$(DEPDIR)/gd2time.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/gd2topng.Po ./$(DEPDIR)/gd_gd.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gd_gd2.Plo ./$(DEPDIR)/gd_gif_in.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gd2togif.Po ./$(DEPDIR)/gd2topng.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gd_gd.Plo ./$(DEPDIR)/gd_gd2.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gd_gif_in.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gd_gif_out.Plo ./$(DEPDIR)/gd_io.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gd_io_dp.Plo ./$(DEPDIR)/gd_io_file.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gd_io_ss.Plo ./$(DEPDIR)/gd_jpeg.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gd_png.Plo ./$(DEPDIR)/gd_ss.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gd_topal.Plo ./$(DEPDIR)/gd_wbmp.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gdcache.Plo ./$(DEPDIR)/gddemo.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gd_png.Plo ./$(DEPDIR)/gd_security.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gd_ss.Plo ./$(DEPDIR)/gd_topal.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gd_wbmp.Plo ./$(DEPDIR)/gdcache.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gdcmpgif.Po ./$(DEPDIR)/gddemo.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontg.Plo ./$(DEPDIR)/gdfontl.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontmb.Plo ./$(DEPDIR)/gdfonts.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontt.Plo ./$(DEPDIR)/gdft.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gdkanji.Plo ./$(DEPDIR)/gdparttopng.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/gdtables.Plo ./$(DEPDIR)/gdtest.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/gdtestft.Po ./$(DEPDIR)/gdtopng.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/gdxpm.Plo ./$(DEPDIR)/pngtogd.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gdxpm.Plo ./$(DEPDIR)/gifanimtest.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/giftogd2.Po ./$(DEPDIR)/pngtogd.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/pngtogd2.Po ./$(DEPDIR)/testac.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/testtr.Po ./$(DEPDIR)/wbmp.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/webpng.Po
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 DIST_SOURCES = $(libgd_la_SOURCES) annotate.c circletexttest.c \
-	fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c \
-	gd2topng.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c \
-	pngtogd.c pngtogd2.c testac.c testtr.c webpng.c
+	fontconfigtest.c fontsizetest.c fontwheeltest.c gd2copypal.c \
+	gd2time.c gd2togif.c gd2topng.c gdcmpgif.c gddemo.c \
+	gdparttopng.c gdtest.c gdtestft.c gdtopng.c gifanimtest.c \
+	giftogd2.c pngtogd.c pngtogd2.c testac.c testtr.c webpng.c
 HEADERS = $(include_HEADERS)
 
 
 	Makefile.in aclocal.m4 config.hin configure configure.ac \
 	depcomp install-sh missing mkinstalldirs
 DIST_SUBDIRS = $(SUBDIRS)
-SOURCES = $(libgd_la_SOURCES) annotate.c circletexttest.c fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c gd2topng.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c pngtogd.c pngtogd2.c testac.c testtr.c webpng.c
+SOURCES = $(libgd_la_SOURCES) annotate.c circletexttest.c fontconfigtest.c fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c gd2togif.c gd2topng.c gdcmpgif.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c gifanimtest.c giftogd2.c pngtogd.c pngtogd2.c testac.c testtr.c webpng.c
 
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 circletexttest$(EXEEXT): $(circletexttest_OBJECTS) $(circletexttest_DEPENDENCIES) 
 	@rm -f circletexttest$(EXEEXT)
 	$(LINK) $(circletexttest_LDFLAGS) $(circletexttest_OBJECTS) $(circletexttest_LDADD) $(LIBS)
+fontconfigtest$(EXEEXT): $(fontconfigtest_OBJECTS) $(fontconfigtest_DEPENDENCIES) 
+	@rm -f fontconfigtest$(EXEEXT)
+	$(LINK) $(fontconfigtest_LDFLAGS) $(fontconfigtest_OBJECTS) $(fontconfigtest_LDADD) $(LIBS)
 fontsizetest$(EXEEXT): $(fontsizetest_OBJECTS) $(fontsizetest_DEPENDENCIES) 
 	@rm -f fontsizetest$(EXEEXT)
 	$(LINK) $(fontsizetest_LDFLAGS) $(fontsizetest_OBJECTS) $(fontsizetest_LDADD) $(LIBS)
 gd2time$(EXEEXT): $(gd2time_OBJECTS) $(gd2time_DEPENDENCIES) 
 	@rm -f gd2time$(EXEEXT)
 	$(LINK) $(gd2time_LDFLAGS) $(gd2time_OBJECTS) $(gd2time_LDADD) $(LIBS)
+gd2togif$(EXEEXT): $(gd2togif_OBJECTS) $(gd2togif_DEPENDENCIES) 
+	@rm -f gd2togif$(EXEEXT)
+	$(LINK) $(gd2togif_LDFLAGS) $(gd2togif_OBJECTS) $(gd2togif_LDADD) $(LIBS)
 gd2topng$(EXEEXT): $(gd2topng_OBJECTS) $(gd2topng_DEPENDENCIES) 
 	@rm -f gd2topng$(EXEEXT)
 	$(LINK) $(gd2topng_LDFLAGS) $(gd2topng_OBJECTS) $(gd2topng_LDADD) $(LIBS)
+gdcmpgif$(EXEEXT): $(gdcmpgif_OBJECTS) $(gdcmpgif_DEPENDENCIES) 
+	@rm -f gdcmpgif$(EXEEXT)
+	$(LINK) $(gdcmpgif_LDFLAGS) $(gdcmpgif_OBJECTS) $(gdcmpgif_LDADD) $(LIBS)
 gddemo$(EXEEXT): $(gddemo_OBJECTS) $(gddemo_DEPENDENCIES) 
 	@rm -f gddemo$(EXEEXT)
 	$(LINK) $(gddemo_LDFLAGS) $(gddemo_OBJECTS) $(gddemo_LDADD) $(LIBS)
 gdtopng$(EXEEXT): $(gdtopng_OBJECTS) $(gdtopng_DEPENDENCIES) 
 	@rm -f gdtopng$(EXEEXT)
 	$(LINK) $(gdtopng_LDFLAGS) $(gdtopng_OBJECTS) $(gdtopng_LDADD) $(LIBS)
+gifanimtest$(EXEEXT): $(gifanimtest_OBJECTS) $(gifanimtest_DEPENDENCIES) 
+	@rm -f gifanimtest$(EXEEXT)
+	$(LINK) $(gifanimtest_LDFLAGS) $(gifanimtest_OBJECTS) $(gifanimtest_LDADD) $(LIBS)
+giftogd2$(EXEEXT): $(giftogd2_OBJECTS) $(giftogd2_DEPENDENCIES) 
+	@rm -f giftogd2$(EXEEXT)
+	$(LINK) $(giftogd2_LDFLAGS) $(giftogd2_OBJECTS) $(giftogd2_LDADD) $(LIBS)
 pngtogd$(EXEEXT): $(pngtogd_OBJECTS) $(pngtogd_DEPENDENCIES) 
 	@rm -f pngtogd$(EXEEXT)
 	$(LINK) $(pngtogd_LDFLAGS) $(pngtogd_OBJECTS) $(pngtogd_LDADD) $(LIBS)
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/annotate.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/circletexttest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontconfigtest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsizetest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontwheeltest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd2copypal.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd2time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd2togif.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd2topng.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_gd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_gd2.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_io_ss.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_jpeg.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_png.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_security.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_ss.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_topal.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd_wbmp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdcache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdcmpgif.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gddemo.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdfontg.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdfontl.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdtestft.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdtopng.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdxpm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gifanimtest.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/giftogd2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtogd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pngtogd2.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testac.Po@am__quote@

src/circletexttest.c

   fprintf (stderr, "Requires PNG support, gd was compiled without it\n");
   exit (0);
 #else
+  char *error;
   FILE *in = 0;
   FILE *out;
   gdImagePtr im;
     {
       radius = gdImageSY (im) / 2;
     }
-  gdImageStringFTCircle (im,
+  error = gdImageStringFTCircle (im,
 			 gdImageSX (im) / 2,
 			 gdImageSY (im) / 2,
 			 radius,
 			 "arial",
 			 24,
 			 "top text",
-			 "bottom text", gdTrueColorAlpha (192, 100, 255, 32));
+			 "bottom text",
+			 gdTrueColorAlpha (192, 100, 255, 32));
+  if (error) 
+    {
+      fprintf(stderr, "gdImageStringFTEx error: %s\n", error);
+    }
   out = fopen ("gdfx.png", "wb");
   if (!out)
     {
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define if you have the fontconfig library. */
+#undef HAVE_LIBFONTCONFIG
+
 /* Define if you have the freetype library. */
 #undef HAVE_LIBFREETYPE
 
-/* Define if you have the freetype library. */
+/* Define if you have the jpeg library. */
 #undef HAVE_LIBJPEG
 
 /* Define to 1 if you have the `m' library (-lm). */
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for GD 2.0.28.
+# Generated by GNU Autoconf 2.57 for GD 2.0.29.
 #
 # Report bugs to <gd@boutell.com>.
 #
 # Identity of this package.
 PACKAGE_NAME='GD'
 PACKAGE_TARNAME='gd'
-PACKAGE_VERSION='2.0.28'
-PACKAGE_STRING='GD 2.0.28'
+PACKAGE_VERSION='2.0.29'
+PACKAGE_STRING='GD 2.0.29'
 PACKAGE_BUGREPORT='gd@boutell.com'
 
 ac_unique_file="gd.c"
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GD 2.0.28 to adapt to many kinds of systems.
+\`configure' configures GD 2.0.29 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GD 2.0.28:";;
+     short | recursive ) echo "Configuration of GD 2.0.29:";;
    esac
   cat <<\_ACEOF
 
   --without-libiconv-prefix     don't search for libiconv in includedir and libdir
   --with-png=DIR          where to find the png library
   --with-freetype=DIR     where to find the freetype 2.x library
+  --with-fontconfig=DIR         where to find the fontconfig library
   --with-jpeg=DIR         where to find the jpeg library
   --with-xpm=DIR          where to find the xpm library
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GD configure 2.0.28
+GD configure 2.0.29
 generated by GNU Autoconf 2.57
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GD $as_me 2.0.28, which was
+It was created by GD $as_me 2.0.29, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=28
+GDLIB_REVISION=29
 GDLIBNAME=gd
 #Expanded by tests later in this file. TBB 2.0.26
 #2.0.28: GIF is standard now. Doesn't depend on anything else,
 
 # Define the identity of the package.
  PACKAGE=gd
- VERSION=2.0.28
+ VERSION=2.0.29
 
 
 cat >>confdefs.h <<_ACEOF
 case $host in
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4780 "configure"' > conftest.$ac_ext
+  echo '#line 4781 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
 save_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 compiler_c_o=no
-if { (eval echo configure:5309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
+if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
   # The compiler can only warn and ignore the option if not recognized
   # So say no if there are warnings
   if test -s out/conftest.err; then
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7141 "configure"
+#line 7142 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 7239 "configure"
+#line 7240 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
 fi
 
 
+# Check whether --with-fontconfig or --without-fontconfig was given.
+if test "${with_fontconfig+set}" = set; then
+  withval="$with_fontconfig"
+  if test -d "$withval"; then
+     LDFLAGS="$LDFLAGS -L$withval/lib"
+     CPPFLAGS="$CPPFLAGS -I$withval/include"
+   fi
+else
+  withval=yes
+fi;
+
+if test "$withval" != no; then
+  echo "$as_me:$LINENO: checking for FcInit in -lfontconfig" >&5
+echo $ECHO_N "checking for FcInit in -lfontconfig... $ECHO_C" >&6
+if test "${ac_cv_lib_fontconfig_FcInit+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfontconfig  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char FcInit ();
+int
+main ()
+{
+FcInit ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fontconfig_FcInit=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fontconfig_FcInit=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fontconfig_FcInit" >&5
+echo "${ECHO_T}$ac_cv_lib_fontconfig_FcInit" >&6
+if test $ac_cv_lib_fontconfig_FcInit = yes; then
+  LIBS="-lfontconfig $LIBS"
+     FEATURES="GD_FONTCONFIG $FEATURES"
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBFONTCONFIG 1
+_ACEOF
+
+fi
+
+else
+  ac_cv_lib_fontconfig_FcInit=no
+fi
+
+
 # Check whether --with-jpeg or --without-jpeg was given.
 if test "${with_jpeg+set}" = set; then
   withval="$with_jpeg"
    Support for PNG library:          $ac_cv_lib_png_png_create_read_struct
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
+   Support for Fontconfig library:   $ac_cv_lib_fontconfig_FcInit
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
    Support for pthreads:             $acx_pthread_ok
 " >&5
    Support for PNG library:          $ac_cv_lib_png_png_create_read_struct
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
+   Support for Fontconfig library:   $ac_cv_lib_fontconfig_FcInit
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
    Support for pthreads:             $acx_pthread_ok
 " >&6
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GD $as_me 2.0.28, which was
+This file was extended by GD $as_me 2.0.29, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GD config.status 2.0.28
+GD config.status 2.0.29
 configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 AC_PREREQ(2.54)
 
 #HEY! Change BOTH the vesion number and the GDLIB_REVISION setting!
-AC_INIT([GD], [2.0.28], [gd@boutell.com])
+AC_INIT([GD], [2.0.29], [gd@boutell.com])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=28
+GDLIB_REVISION=29
 GDLIBNAME=gd
 #Expanded by tests later in this file. TBB 2.0.26
 #2.0.28: GIF is standard now. Doesn't depend on anything else,
   ac_cv_lib_freetype_FT_Init_FreeType=no
 fi
 
+dnl check for libfontconfig by default
+AC_ARG_WITH(fontconfig,dnl
+[  --with-fontconfig=DIR         where to find the fontconfig library],
+  [if test -d "$withval"; then
+     LDFLAGS="$LDFLAGS -L$withval/lib"
+     CPPFLAGS="$CPPFLAGS -I$withval/include"
+   fi],
+  withval=yes)
+
+if test "$withval" != no; then
+  AC_CHECK_LIB(fontconfig,FcInit,
+    [LIBS="-lfontconfig $LIBS" 
+     FEATURES="GD_FONTCONFIG $FEATURES"
+     AC_DEFINE(HAVE_LIBFONTCONFIG, 1, [ Define if you have the fontconfig library. ])])
+else
+  ac_cv_lib_fontconfig_FcInit=no
+fi
+
 dnl check for libjpeg by default
 AC_ARG_WITH(jpeg,dnl
 [  --with-jpeg=DIR         where to find the jpeg library],
   AC_CHECK_LIB(jpeg,jpeg_set_defaults,
     [LIBS="-ljpeg $LIBS" 
      FEATURES="GD_JPEG $FEATURES"
-     AC_DEFINE(HAVE_LIBJPEG, 1, [ Define if you have the freetype library. ])])
+     AC_DEFINE(HAVE_LIBJPEG, 1, [ Define if you have the jpeg library. ])])
 else
   ac_cv_lib_jpeg_jpeg_set_defaults=no
 fi
    Support for PNG library:          $ac_cv_lib_png_png_create_read_struct
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
+   Support for Fontconfig library:   $ac_cv_lib_fontconfig_FcInit
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
    Support for pthreads:             $acx_pthread_ok
 ])
 <!-- REMEMBER TO EDIT index.html.source -->
 <head>
-<TITLE>gd 2.0.28</TITLE>
+<TITLE>gd 2.0.29</TITLE>
 </head>
 <body bgcolor="#FFFFFF">
 <!-- BANNER HERE -->
-<H2>gd 2.0.28</H2>
+<H2>gd 2.0.29</H2>
 <H3>A graphics library for fast image creation</H3>
 <H3>Follow this link to the
 <A HREF="http://www.boutell.com/gd/">latest version
 To ensure that your
 new installation overwrites the old.
 <p>
-<strong>GIF support has been restored in gd 2.0.28.</strong>
+<strong>GIF support has been restored in gd 2.0.28 and above.</strong>
 The well-known patents on LZW compression held by Unisys
 have expired in all countries. British Telecom and IBM may hold related
 patents but have never chosen to require royalties for GIF applications,
 legal advice regarding this issue. PNG remains a superior format especially
 if lossless truecolor images are needed.
 <p>
-When building from soruce, gd 2.0.28 <strong>requires</strong> that the 
+When building from soruce, gd 2.0.29 <strong>requires</strong> that the 
 following libraries also be installed, in order to produce the related 
 image formats. The win32 binary release (bgd) already contains the
 appropriate libraries.
 <H3>Table of Contents</H3>
 <UL>
 <LI><A HREF="#notice">Credits and license terms</A>
-<LI><A HREF="#whatsnew2.0.28">What's new in version "XYZ" of GD?</A>
+<LI><A HREF="#whatsnew2.0.29">What's new in version "XYZ" of GD?</A>
 <LI><A HREF="#whatis">What is gd?</A>
 <LI><A HREF="#gdother">What if I want to use another programming language?</A>
 <LI><A HREF="#required">What else do I need to use gd?</A>
 Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004 Maurice Szmurlo and Johan Van 
 den Brande.
 <p>
+Portions relating to GIF animations copyright 2004 Jaakko Hyv&auml;tti (jaakko.hyvatti@iki.fi)
+<p>
 <strong>Permission has been granted to copy, distribute and modify gd in any
 context without fee, including a commercial application, provided that this notice
 is present in user-accessible supporting documentation.</strong>
 <A NAME="gdother"><H3>What if I want to use another programming
 language?</h3></A>
 Not all of these tools are necessarily up to date and fully compatible
-with 2.0.28.
+with 2.0.29.
 <h4>PHP</h4>
 A variant of gd 2.x is included in PHP 4.3.0. It is also possible
-to patch PHP 4.2.3 for use with gd 2.0.28; see the
+to patch PHP 4.2.3 for use with gd 2.0.29; see the
 <a href="http://www.boutell.com/gd/">gd home page</a> for a link to
 that information. It would be a Good Idea to merge all of the things
 that are better in mainstream gd and all of the things that are
 <ul>
 <li><a href="http://martin.gleeson.com/fly/">fly</a>, by Martin Gleeson
 </ul>
+<p>
+<A NAME="whatsnew2.0.29"><h3>What's new in version 2.0.29?</h3></a>
+<p>
+<ul>
+<li>A 32-bit multiplication overflow vulnerability reported on
+the Bugtraq mailing list has been corrected, along with a number
+of similar issues. These bugs come into play only when attempting
+to deal with images with <i>extremely large</i> dimensions.
+The relevant functions now fail gracefully when such extreme
+parameters are specified. The code in question is also 
+correct for systems with larger bit depths. Thanks to Phil Knirsch,
+Alan Cox and infamous41md.
+Since exploits are theoretically possible, upgrading is recommended.
+<li>Support for the fontconfig library, when available. 
+When fontconfig is available and gdFTUseFontConfig(1) has been invoked
+or the gdFTEX_FONTCONFIG flag has been set for a particular call, fontconfig
+patterns can be used to fetch the best available font. 
+For instance, "arial:bold:italic" does the right thing (or as close as
+the available fonts permit). Also, standard 
+PostScript font names can be mapped to an appropriate font by 
+gdImageStringFTEx and relatives. 
+When fontconfig is available <tt>gdlib-config --features</tt> will list
+the GD_FONTCONFIG feature. For more information about fontconfig, see the
+<a href="http://freedesktop.org/software/fontconfig">fontconfig pages</a>.
+<p>
+The actual resolved font filename can be returned in the gdFTStringExtra
+structure as the fontpath element if the gdFTEX_RETURNFONTPATHNAME flag
+is set. Also, a 
+vector of character position advances can be retrieved if gdFTEX_XSHOW is set 
+in the flags element. .afm files (font metrics) are now used to adjust size 
+calculations
+when available. When fontconfig is not available, gd falls back to its
+usual behavior and requires a specific font file name. One can
+still fetch fonts by filename when gdFTUseFontConfig(1) is in effect, by
+setting the gdFTEX_FONTPATHNAME flag
+in the flag element of the gdFTStringExtra structure. Thanks to
+Dag Lem and John Ellson.
+<li>Additional freetype fixes: fixed width fonts are now the right
+size, horizontal advance calculations now better match the
+PostScript equivalent, and various compiler warning fixes. Also,
+a fix to the encoding table selection in the was made, addressing a problem
+with latin1 font encodings. Thanks to Dag Lem and John Ellson. 
+<li>Improved tolerance when reading JPEG files containing some garbage as well
+as valid image data.
+<li>Easier compilation on Windows: no errno.h in gd_gd2.c.
+<li>Support for creating optimized GIF animations has been added
+ by Jaakko Hyv&auml;tti.  See
+ <A HREF="#gdImageGifAnimAdd">gdImageGifAnimAdd</A>,
+ <A HREF="#gdImageGifAnimAddCtx">gdImageGifAnimAddCtx</A>,
+ <A HREF="#gdImageGifAnimAddPtr">gdImageGifAnimAddPtr</A>,
+ <A HREF="#gdImageGifAnimBegin">gdImageGifAnimBegin</A>,
+ <A HREF="#gdImageGifAnimBeginCtx">gdImageGifAnimBeginCtx</A>,
+ <A HREF="#gdImageGifAnimBeginPtr">gdImageGifAnimBeginPtr</A>,
+ <A HREF="#gdImageGifAnimEnd">gdImageGifAnimEnd</A>,
+ <A HREF="#gdImageGifAnimEndCtx">gdImageGifAnimEndCtx</A>, and
+ <A HREF="#gdImageGifAnimEndPtr">gdImageGifAnimEndPtr</A>.
+<li><A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A> has been
+ added to allow consecutive line segments to be drawn without
+ connecting the end points to form a closed polygon. Thanks to
+Jaakko Hyv&auml;tti.
+<li>Better alpha channel blending when the destination color
+contains an alpha channel. Also, quicker handling of the
+most common cases. Thanks to Frank Warmerdam.
+</ul>
 <P>
 <A NAME="whatsnew2.0.28"><H3>What's new in version 2.0.28?</H3></A>
 <P>
 </ul>
 <h4>Source Code:</h4>
 <ul>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.28.tar.gz">Gzipped Tar File (Unix)</a>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.28.zip">.ZIP File of SOURCE CODE (Windows)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.29.tar.gz">Gzipped Tar File (Unix)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.29.zip">.ZIP File of SOURCE CODE (Windows)</a>
 </ul>
 <P>
 <A NAME="buildgd"><H3>How do I build gd?</H3></A>
 consult with an experienced user of your system. Sorry, we cannot
 answer questions about basic Internet skills.
 <p>
-Unpacking the archive will produce a directory called "gd-2.0.28".
+Unpacking the archive will produce a directory called "gd-2.0.29".
 <p>
 <h4>For Unix</h4>
-<code>cd</code> to the 2.0.28 directory and type:
+<code>cd</code> to the 2.0.29 directory and type:
 <p>
 <code>./configure</code>
 <P>
 <DT><A NAME="gdPoint">gdPoint</A> <strong>(TYPE)</strong>
 <DD>
 Represents a point in the coordinate space of the image; used
-by <A HREF="#gdImagePolygon">gdImagePolygon</A> and
+by <A HREF="#gdImagePolygon">gdImagePolygon</A>,
+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A> and
 <A HREF="#gdImageFilledPolygon">gdImageFilledPolygon</A>.
 <PRE>
 typedef struct {
 <DT><A NAME="gdPointPtr">gdPointPtr</A> <strong>(TYPE)</strong>
 <DD>
 A pointer to a <A HREF="#gdPoint">gdPoint</A> structure; passed
-as an argument to <A HREF="#gdImagePolygon">gdImagePolygon</A>
+as an argument to <A HREF="#gdImagePolygon">gdImagePolygon</A>,
+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A>
 and <A HREF="#gdImageFilledPolygon">gdImageFilledPolygon</A>.
 </DL>
 <DT><A NAME="gdFTStringExtra">gdFTStringExtra</a> <strong>(TYPE)</strong>
 <STRONG>(FUNCTION)</STRONG>
 <DD>
 gdImageGif outputs the specified image to the specified
-file in PNG format. The file must be open for writing. Under MSDOS
+file in GIF 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. gdImageGif does <em>not</em>
 malloc, free, etc. are used both at library build time and at application
 build time.</strong> The 'size' parameter receives the total size of the block
 of memory.
+
+<DT><A NAME="gdImageGifAnimBegin">
+void gdImageGifAnimBegin(gdImagePtr im, FILE *out, int GlobalCM, int Loops)</A>
+<br>
+<A NAME="gdImageGifAnimBeginCtx">
+void gdImageGifAnimBeginCtx(gdImagePtr im, gdIOCtx *out, int GlobalCM, int Loops)</A>
+
+<STRONG>(FUNCTION)</STRONG>
+
+<DD>This function must be called as the first function when creating a
+GIF animation.  It writes the correct GIF file headers to selected
+file output, and prepares for frames to be added for the animation.
+The image argument is not used to produce an image frame to the file,
+it is only used to establish the GIF animation frame size, interlacing
+options and the color palette.  gdImageGifAnimAdd is used to
+add the first and subsequent frames to the animation, and the animation
+must be terminated by writing a semicolon character (;) to it or by using
+gdImageGifAnimEnd to do that.
+<p>
+
+The GlobalCM flag indicates if a global color map (or palette) is used
+in the GIF89A header.  A nonzero value specifies that a global color
+map should be used to reduce the size of the animation.
+Of course, if the color maps of
+individual frames differ greatly, a global color map may not be a good idea.
+GlobalCM=1 means write global color map, GlobalCM=0 means do not, and
+GlobalCM=-1 means to do the default, which currently is to use a global
+color map.
+
+<p>
+
+If Loops is 0 or greater, the Netscape 2.0 extension for animation
+loop count is written.  0 means infinite loop count.  -1 means that
+the extension is not added which results in no looping. -1 is the
+default.
+
+<DT><A NAME="gdImageGifAnimBeginPtr">
+void* gdImageGifAnimBeginPtr(gdImagePtr im, int *size, int GlobalCM, int Loops)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>Identical to gdImageGifAnimBegin except that it returns a pointer
+to a memory area with the GIF data. This memory must be freed by the
+caller when it is no longer needed. <strong>The caller must invoke
+gdFree(), not free(), unless the caller is absolutely certain that the
+same implementations of malloc, free, etc. are used both at library
+build time and at application build time.</strong> The 'size'
+parameter receives the total size of the block of memory.
+
+<DT><A NAME="gdImageGifAnimAdd">
+void gdImageGifAnimAdd(gdImagePtr im, FILE *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)</A>
+<br>
+<A NAME="gdImageGifAnimAddCtx">
+void gdImageGifAnimAddCtx(gdImagePtr im, gdIOCtx *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)</A>
+
+<STRONG>(FUNCTION)</STRONG>
+
+<DD> This function writes GIF animation frames to GIF animation, which
+was initialized with <a
+href="#gdImageGifAnimBegin">gdImageGifAnimBegin</a>.  With LeftOfs and
+TopOfs you can place this frame in different offset than (0,0) inside
+the image screen as defined in gdImageGifAnimBegin.  Delay between the
+previous frame and this frame is in 1/100s units.  Disposal is usually
+<code>gdDisposalNone</code>, meaning that the pixels changed by this
+frame should remain on the display when the next frame begins to render, but
+can also be <code>gdDisposalUnknown</code> (not recommended),
+<code>gdDisposalRestoreBackground</code> (restores the first
+allocated color of the global palette), or
+<code>gdDisposalRestorePrevious</code> (restores the appearance of the
+affected area before the frame was rendered). Only
+<code>gdDisposalNone</code> is a sensible choice for the first frame.
+If <code>previm</code> is
+passed, the built-in GIF optimizer will always use <code>gdDisposalNone</code> 
+regardless of the Disposal parameter.
+<p>
+Setting the LocalCM flag to 1 adds a local palette for this image to the 
+animation.  Otherwise the global palette is assumed and the user must make 
+sure the palettes match.  Use <A HREF="#gdImagePaletteCopy">gdImagePaletteCopy</A> to do that.
+
+<p>
+
+Automatic optimization is activated by giving the previous image as a 
+parameter.  This function then compares the images and only writes the changed
+pixels to the new frame in animation.  The Disposal parameter for
+optimized animations must be set to 1, also for the first frame.
+LeftOfs and TopOfs parameters are ignored for optimized frames.  To
+achieve good optimization, it is usually best to use a single global 
+color map.  To allow gdImageGifAnimAdd to compress unchanged pixels via
+the use of a transparent color, the image must include a transparent color.
+
+<PRE>
+... inside a function ...
+gdImagePtr im, im2, im3;
+int black, white, trans;
+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);
+/* Allocate transparent color for animation compression */
+trans = gdImageColorAllocate(im, 1, 1, 1);
+/* Draw rectangle */
+gdImageRectangle(im, 0, 0, 10, 10, black);
+/* Open output file in binary mode */
+out = fopen("anim.gif", "wb");
+/* Write GIF header.  Use global color map.  Loop a few times */
+gdImageGifAnimBegin(im, out, 1, 3);
+/* Write the first frame.  No local color map.  Delay = 1s */
+gdImageGifAnimAdd(im, out, 0, 0, 0, 100, 1, NULL);
+/* construct the second frame */
+im2 = gdImageCreate(100, 100);
+/* Allocate background to make it white */
+(void)gdImageColorAllocate(im2, 255, 255, 255);
+/* Make sure the palette is identical */
+gdImagePaletteCopy (im2, im);
+/* Draw something */
+gdImageRectangle(im2, 0, 0, 15, 15, black);
+/* Allow animation compression with transparent pixels */
+gdImageColorTransparent (im2, trans);
+/* Add the second frame */
+gdImageGifAnimAdd(im2, out, 0, 0, 0, 100, 1, im);
+/* construct the second frame */
+im3 = gdImageCreate(100, 100);
+/* Allocate background to make it white */
+(void)gdImageColorAllocate(im3, 255, 255, 255);
+/* Make sure the palette is identical */
+gdImagePaletteCopy (im3, im);
+/* Draw something */
+gdImageRectangle(im3, 0, 0, 15, 20, black);
+/* Allow animation compression with transparent pixels */
+gdImageColorTransparent (im3, trans);
+/* Add the third frame, compressing against the second one */
+gdImageGifAnimAdd(im3, out, 0, 0, 0, 100, 1, im2);
+/* Write the end marker */
+/* gdImageGifAnimEnd(out); is the same as the following: */
+putc (';', out);
+/* Close file */
+fclose(out);
+/* Destroy images */
+gdImageDestroy(im);
+gdImageDestroy(im2);
+gdImageDestroy(im3);
+</PRE>
+
+<DT><A NAME="gdImageGifAnimAddPtr">
+void* gdImageGifAnimAddPtr(gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>Identical to gdImageGifAnimAdd except that it returns a pointer
+to a memory area with the GIF data. This memory must be freed by the
+caller when it is no longer needed. <strong>The caller must invoke
+gdFree(), not free(), unless the caller is absolutely certain that the
+same implementations of malloc, free, etc. are used both at library
+build time and at application build time.</strong> The 'size'
+parameter receives the total size of the block of memory.
+
+<DT><A NAME="gdImageGifAnimEnd">
+void gdImageGifAnimEnd(FILE *out)</A>
+<br>
+<A NAME="gdImageGifAnimEndCtx">
+void gdImageGifAnimEndCtx(gdIOCtx *out)</A>
+
+<STRONG>(FUNCTION)</STRONG>
+
+<DD>Writes semicolon character (;) to the output file.  This
+terminates the GIF file properly.  You can omit the call to
+gdImageGifAnimEnd and just print out the semicolon.
+
+<DT><A NAME="gdImageGifAnimEndPtr">
+void* gdImageGifAnimEndPtr(int *size)</A>
+<STRONG>(FUNCTION)</STRONG>
+
+<DD>Returns a one byte string containing the semicolon character (;).
+Returns a pointer to a memory area with that string. This memory must
+be freed by the caller when it is no longer needed. <strong>The caller
+must invoke gdFree(), not free(), unless the caller is absolutely
+certain that the same implementations of malloc, free, etc. are used
+both at library build time and at application build time.</strong> The
+'size' parameter receives the total size of the block of memory.  The
+string ";" can be used in place of this function.
+
 <DT><A NAME="gdImagePng">
 void gdImagePng(gdImagePtr im, FILE *out)</A>
 <br>
 /* Destroy it */
 <A HREF="#gdImageDestroy">gdImageDestroy</A>(im);
 </PRE>
+<DT><A NAME="gdImageOpenPolygon">void gdImageOpenPolygon(gdImagePtr im, gdPointPtr points, int pointsTotal, int color)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>
+gdImageOpenPolygon is used to draw a sequence of lines with the verticies
+(at least 3) specified, using the color index specified.  Unlike
+<A HREF="#gdImagePolygon">gdImagePolygon</A>, the enpoints of the line
+sequence are not connected to a closed polygon.
 <DT><A NAME="gdImageRectangle">void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color)</A>
 <STRONG>(FUNCTION)</STRONG>
 <DD>
 percentage of the background, depending on how much of the pixel in question
 is actually within the boundaries of the line being drawn. 
 All line-drawing functions,
-such as <A HREF="#gdImageLine">gdImageLine</A> and
+such as <A HREF="#gdImageLine">gdImageLine</A>,
+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A> and
 <A HREF="#gdImagePolygon">gdImagePolygon</A>, will draw antialiased lines
 if the special "color" <A HREF="#gdAntiAliased">
 gdAntiAliased</A> is used when calling them.
 setting the transparent color index of the brush image with
 <A HREF="#gdImageColorTransparent">gdImageColorTransparent</A>,
 a brush of any shape can be created. All line-drawing functions,
-such as <A HREF="#gdImageLine">gdImageLine</A> and
+such as <A HREF="#gdImageLine">gdImageLine</A>,
+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A> and
 <A HREF="#gdImagePolygon">gdImagePolygon</A>, will use the
 current brush if the special "color" <A HREF="#gdBrushed">
 gdBrushed</A> or <A HREF="#gdStyledBrushed">gdStyledBrushed</A>
 </PRE>
 <DT><A NAME="gdImageSetThickness">void gdImageSetThickness(gdImagePtr im, int thickness)</A> <STRONG>(FUNCTION)</STRONG>
 <DD>gdImageSetThickness determines the width of lines drawn by the
-<a href="#gdImageLine">gdImageLine</a>, <a href="#gdImagePolygon">gdImagePolygon</a>
+<a href="#gdImageLine">gdImageLine</a>, <a href="#gdImagePolygon">gdImagePolygon</a>, <a href="#gdImageOpenPolygon">gdImageOpenPolygon</a>
 and related functions, in pixels. 
 <PRE>
 ... inside a function ...
 This function was added in gd1.3 to provide a means of rendering
 fonts with more than 256 characters for those who have them. A
 more frequently used routine is <a href="#gdImageStringUp">gdImageStringUp</a>.
+<DT><A NAME="gdFTUseFontConfig">int gdFTUseFontConfig(int flag)</a>
+<STRONG>(FUNCTION)</STRONG>
+<DD>
+GD 2.0.29 introduced the ability to use 
+<a href="http://freedesktop.org/software/fontconfig">fontconfig patterns</a>
+rather than font file names as parameters to 
+<a href="#gdImageStringFT">gdImageStringFT</a>,
+<a href="#gdImageStringFTEx">gdImageStringFTEx</a> and
+<a href="#gdImageStringFTEx">gdImageStringFTCircle</a>. 
+For backwards compatibility reasons, the fontlist parameter to those
+functions is still expected to be a full or partial font file path name 
+or list thereof by default. However, as a convenience, a single call
+to gdFTUseFontConfig with a nonzero parameter configures gd to expect
+the fontlist parameter to be a fontconfig pattern. Regardless of whether
+the flag argument is nonzero, this function returns true when the 
+fontconfig library is available and false when it is not. When fontconfig
+is not available, the fontlist parameter always behaves as in previous
+versions of GD.
+<pre>
+#include "gd.h"
+#include &lt;string.h&gt;
+... inside a function ...
+<A HREF="#gdImagePtr">gdImagePtr</A> im;
+int black;
+int white;
+int brect[8];
+int x, y;
+char *err;
+
+char *s = "Hello."; /* String to draw. */
+double sz = 40.;
+char *fc = "times:bold:italic"; /* fontconfig pattern */
+
+/* Signal that all freetype font calls in this program will receive
+  fontconfig patterns rather than filenames of font files */
+gdUseFontConfig(1);
+
+/* obtain brect so that we can size the image */
+err = <A HREF="#gdImageStringFT">gdImageStringFT</A>(NULL,&brect[0],0,fc,sz,0.,0,0,s);
+if (err) {fprintf(stderr,err); return 1;}
+
+/* create an image big enough for the string plus a little whitespace */
+x = brect[2]-brect[6] + 6;
+y = brect[3]-brect[7] + 6;
+im = <A HREF="#gdImageCreate">gdImageCreate</A>(x,y);
+
+/* Background color (first allocated) */
+white = <A HREF="#gdImageColorResolve">gdImageColorResolve</A>(im, 255, 255, 255);
+black = <A HREF="#gdImageColorResolve">gdImageColorResolve</A>(im, 0, 0, 0);
+
+/* render the string, offset origin to center string*/
+/* note that we use top-left coordinate for adjustment
+ * since gd origin is in top-left with y increasing downwards. */
+x = 3 - brect[6];
+y = 3 - brect[7];
+err = <A HREF="#gdImageStringFT">gdImageStringFT</A>(im,&brect[0],black,fc,sz,0.0,x,y,s);
+if (err) {fprintf(stderr,err); return 1;}
+</pre>
 <DT><A NAME="gdImageStringFT">
 char *gdImageStringFT(gdImagePtr im, int *brect,
   int fg, char *fontname, double ptsize, double angle,
        /* Rendering resolution */
        int hdpi;
        int vdpi;
+       char *xshow;
+       char *fontpath;
 } gdFTStringExtra, *gdFTStringExtraPtr;
 </pre>
 To output multiline text with a specific line spacing, 
 <pre>
 flags | gdFTEX_RESOLUTION;
 </pre>
+GD 2.0.29 and later will normally attempt to apply kerning tables, if 
+fontconfig is available, to adjust the relative positions of consecutive 
+characters more ideally for that pair of characters. This can be turn off by
+specifying the gdFTEX_DISABLE_KERNING flag:
+<pre>
+flags | gdFTEX_DISABLE_KERNING;
+</pre>
+GD 2.0.29 and later can return a vector of individual character
+position advances, occasionally useful in applications that must know
+exactly where each character begins. This is returned in the xshow
+element of the gdFTStringExtra structure if the gdFTEX_XSHOW
+flag is set:
+<pre>
+flags | gdFTEX_XSHOW;
+</pre>
+<b>The caller is responsible for calling gdFree() on the xshow
+element after the call</b> if gdFTEX_XSHOW is set.
+<p>
+GD 2.0.29 and later can also return the path to the actual font file
+used if the gdFTEX_RETURNFONTPATHNAME flag is set. This is useful because 
+GD 2.0.29 and above are capable of
+selecting a font automatically based on a fontconfig font pattern
+when fontconfig is available. This information is returned in the
+fontpath element of the gdFTStringExtra structure. 
+<pre>
+flags | gdFTEX_RETURNFONTPATHNAME;
+</pre>
+<b>The caller is responsible for calling gdFree() on the fontpath
+element after the call</b> if gdFTEX_RETURNFONTPATHNAME is set.
+<p>
+GD 2.0.29 and later can use fontconfig to resolve
+font names, including fontconfig patterns, if the gdFTEX_FONTCONFIG
+flag is set. As a convenience, this behavior can be made the default
+by calling <a href="#gdFTUseFontConfig">gdFTUseFontConfig</a> with
+a nonzero value. In that situation it is not necessary to set the
+gdFTEX_FONTCONFIG flag on every call; however explicit font path names
+can still be used if the gdFTEX_FONTPATHNAME flag is set:
+<pre>
+flags | gdFTEX_FONTPATHNAME;
+</pre>
 <p>
+Unless <a href="#gdFTUseFontConfig">gdFTUseFontConfig</a> has been
+called with a nonzero value, GD 2.0.29 and later will still expect
+the fontlist argument to the freetype text output functions to be
+a font file name or list thereof as in previous versions. If you do
+not wish to make fontconfig the default, it is
+still possible to force the use of fontconfig for a single call to
+the freetype text output functions by setting the gdFTEX_FONTCONFIG
+flag:
+<pre>
+flags | gdFTEX_FONTCONFIG;
+</pre>
+GD 2.0.29 and above can use fontconfig to resolve
+font names, including fontconfig patterns, if the gdFTEX_FONTCONFIG
+flag is set. As a convenience, this behavior can be made the default
+by calling <a href="#gdFTUseFontConfig">gdFTUseFontConfig</a> with
+a nonzero value. In that situation it is not necessary to set the
+gdFTEX_FONTCONFIG flag on every call; however explicit font path names
+can still be used if the gdFTEX_FONTPATHNAME flag is set:
+<pre>
+flags | gdFTEX_FONTPATHNAME;
+</pre>
 For more information, see <a href="#gdImageStringFT">gdImageStringFT</a>.
 <DT><A NAME="gdImageStringFTCircle">
 char *gdImageStringFTCircle(gdImagePtr im,
 <A HREF="#gdImageFillToBorder">gdImageFillToBorder</A> |
 <A HREF="#gdImageFilledRectangle">gdImageFilledRectangle</A> |
 <A HREF="#gdImageGd">gdImageGd</A> |
-<A HREF="#gdImageGd">gdImageGd2</A> |
+<A HREF="#gdImageGd2">gdImageGd2</A> |
 <A HREF="#gdImageGetInterlaced">gdImageGetInterlaced</A> |
 <A HREF="#gdImageGetPixel">gdImageGetPixel</A> |
 <A HREF="#gdImageGetTransparent">gdImageGetTransparent</A> |
+<A HREF="#gdImageGifAnimAdd">gdImageGifAnimAdd</A> |
+<A HREF="#gdImageGifAnimAddCtx">gdImageGifAnimAddCtx</A> |
+<A HREF="#gdImageGifAnimAddPtr">gdImageGifAnimAddPtr</A> |
+<A HREF="#gdImageGifAnimBegin">gdImageGifAnimBegin</A> |
+<A HREF="#gdImageGifAnimBeginCtx">gdImageGifAnimBeginCtx</A> |
+<A HREF="#gdImageGifAnimBeginPtr">gdImageGifAnimBeginPtr</A> |
+<A HREF="#gdImageGifAnimEnd">gdImageGifAnimEnd</A> |
+<A HREF="#gdImageGifAnimEndCtx">gdImageGifAnimEndCtx</A> |
+<A HREF="#gdImageGifAnimEndPtr">gdImageGifAnimEndPtr</A> |
 <A HREF="#gdImageGreen">gdImageGreen</A> |
 <A HREF="#gdImageInterlace">gdImageInterlace</A> |
 <A HREF="#gdImageJpeg">gdImageJpeg</A> |
 <A HREF="#gdImageJpegCtx">gdImageJpegCtx</A> |
 <A HREF="#gdImageLine">gdImageLine</A> |
 <A HREF="#gdImageFilledPolygon">gdImageFilledPolygon</A> |
+<A HREF="#gdImageOpenPolygon">gdImageOpenPolygon</A> |
 <A HREF="#gdImagePaletteCopy">gdImagePaletteCopy</A> |
 <A HREF="#gdImagePng">gdImagePng</A> |
 <A HREF="#gdImagePngEx">gdImagePngEx</A> |

src/makefile.sample

 
 PROGRAMS=$(BIN_PROGRAMS) $(TEST_PROGRAMS)
 
-BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng
+BIN_PROGRAMS=pngtogd pngtogd2 gdtopng gd2topng gd2copypal gdparttopng webpng gd2togif gdcmpgif giftogd2
 TEST_PROGRAMS=gdtest gddemo gd2time gdtestft testac fontsizetest fontwheeltest
 
 default: instructions
 	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 gd2togif $(INSTALL_BIN)/gd2togif
+	sh ./install-item 755 gdcmpgif $(INSTALL_BIN)/gdcmpgif
+	sh ./install-item 755 giftogd2 $(INSTALL_BIN)/giftogd2
 	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
 gd2topng: gd2topng.o
 	$(CC) gd2topng.o -o gd2topng	$(LIBDIRS) $(LIBS)
 
+gd2togif: gd2togif.o
+	$(CC) gd2togif.o -o gd2togif    $(LIBDIRS) $(LIBS)
+
+gdcmpgif: gdcmpgif.o
+	$(CC) gdcmpgif.o -o gdcmpgif    $(LIBDIRS) $(LIBS)
+
+giftogd2: giftogd2.o
+	$(CC) giftogd2.o -o giftogd2      $(LIBDIRS) $(LIBS)
+
 gd2copypal: gd2copypal.o
 	$(CC) gd2copypal.o -o gd2copypal	$(LIBDIRS) $(LIBS)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.