Anonymous avatar Anonymous committed e9f70fd

- sync to 2.0.18

Comments (0)

Files changed (20)

src/circletexttest.c

 int
 main (int argc, char *argv[])
 {
-	FILE *in;
+	FILE *in = 0;
 	FILE *out;
 	gdImagePtr im;
 	int radius;
 	/* Create an image of text on a circle, with an
 		alpha channel so that we can copy it onto a
 		background */
+	/* TBB: 2.0.18: shouldn't depend on JPEG */
+#ifdef HAVE_LIBJPEG
 	in = fopen("eleanor.jpg", "rb");
 	if (!in) {
 		im = gdImageCreateTrueColor(300, 300);
 		im = gdImageCreateFromJpeg(in);
 		fclose(in);
 	}
+#else
+	im = gdImageCreateTrueColor(300, 300);
+#endif /* HAVE_LIBJPEG */	
 	if (gdImageSX(im) < gdImageSY(im)) {
 		radius = gdImageSX(im) / 2;
 	} else {
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for GD 2.0.17.
+# Generated by GNU Autoconf 2.57 for GD 2.0.18.
 #
 # Report bugs to <gd@boutell.com>.
 #
 # Identity of this package.
 PACKAGE_NAME='GD'
 PACKAGE_TARNAME='gd'
-PACKAGE_VERSION='2.0.17'
-PACKAGE_STRING='GD 2.0.17'
+PACKAGE_VERSION='2.0.18'
+PACKAGE_STRING='GD 2.0.18'
 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.17 to adapt to many kinds of systems.
+\`configure' configures GD 2.0.18 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.17:";;
+     short | recursive ) echo "Configuration of GD 2.0.18:";;
    esac
   cat <<\_ACEOF
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GD configure 2.0.17
+GD configure 2.0.18
 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.17, which was
+It was created by GD $as_me 2.0.18, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=17
+GDLIB_REVISION=18
 GDLIBNAME=gd
 
 
 
 # Define the identity of the package.
  PACKAGE=gd
- VERSION=2.0.17
+ VERSION=2.0.18
 
 
 cat >>confdefs.h <<_ACEOF
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GD $as_me 2.0.17, which was
+This file was extended by GD $as_me 2.0.18, 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.17
+GD config.status 2.0.18
 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.17], [gd@boutell.com])
+AC_INIT([GD], [2.0.18], [gd@boutell.com])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=17
+GDLIB_REVISION=18
 GDLIBNAME=gd
 
 AC_SUBST(GDLIB_MAJOR)
 #ifndef GD_H
 #define GD_H 1
 
+/* Do the DLL dance: dllexport when building the DLL,
+	dllimport when importing from it, nothing when
+	not on Silly Silly Windows (tm Aardman Productions). */
+
+#ifdef BGDWIN32
+#define BGD_EXPORT __declspec(dllexport)
+#else
+#ifdef WIN32
+#define BGD_EXPORT __declspec(dllimport)
+#else
+#define BGD_EXPORT
+#endif /* WIN32 */
+#endif /* BGDWIN32 */
+
 #ifdef __cplusplus
 extern "C"
 {
 	based on the alpha channel value of the source color.
 	The resulting color is opaque. */
 
-  int gdAlphaBlend (int dest, int src);
+   BGD_EXPORT int gdAlphaBlend (int dest, int src);
 
   typedef struct gdImageStruct
   {
 /* Functions to manipulate images. */
 
 /* Creates a palette-based image (up to 256 colors). */
-  gdImagePtr gdImageCreate (int sx, int sy);
+   BGD_EXPORT gdImagePtr gdImageCreate (int sx, int sy);
 
 /* An alternate name for the above (2.0). */
 #define gdImageCreatePalette gdImageCreate
 
 /* Creates a truecolor image (millions of colors). */
-  gdImagePtr gdImageCreateTrueColor (int sx, int sy);
+   BGD_EXPORT gdImagePtr gdImageCreateTrueColor (int sx, int sy);
 
 /* Creates an image from various file types. These functions
 	return a palette or truecolor image based on the
 	nature of the file being loaded. Truecolor PNG
 	stays truecolor; palette PNG stays palette-based;
 	JPEG is always truecolor. */
-  gdImagePtr gdImageCreateFromPng (FILE * fd);
-  gdImagePtr gdImageCreateFromPngCtx (gdIOCtxPtr in);
-  gdImagePtr gdImageCreateFromWBMP (FILE * inFile);
-  gdImagePtr gdImageCreateFromWBMPCtx (gdIOCtx * infile);
-  gdImagePtr gdImageCreateFromJpeg (FILE * infile);
-  gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile);
+   BGD_EXPORT gdImagePtr gdImageCreateFromPng (FILE * fd);
+   BGD_EXPORT gdImagePtr gdImageCreateFromPngCtx (gdIOCtxPtr in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromWBMP (FILE * inFile);
+   BGD_EXPORT gdImagePtr gdImageCreateFromWBMPCtx (gdIOCtx * infile);
+   BGD_EXPORT gdImagePtr gdImageCreateFromJpeg (FILE * infile);
+   BGD_EXPORT gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx * infile);
 
 /* A custom data source. */
 /* The source function must return -1 on error, otherwise the number
   }
   gdSource, *gdSourcePtr;
 
-  gdImagePtr gdImageCreateFromPngSource (gdSourcePtr in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromPngSource (gdSourcePtr in);
 
-  gdImagePtr gdImageCreateFromGd (FILE * in);
-  gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromGd (FILE * in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in);
 
-  gdImagePtr gdImageCreateFromGd2 (FILE * in);
-  gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromGd2 (FILE * in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in);
 
-  gdImagePtr gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w,
+   BGD_EXPORT gdImagePtr gdImageCreateFromGd2Part (FILE * in, int srcx, int srcy, int w,
 				       int h);
-  gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy,
+   BGD_EXPORT gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy,
 					  int w, int h);
   /* 2.0.10: prototype was missing */
-  gdImagePtr gdImageCreateFromXpm (char *filename);
-  gdImagePtr gdImageCreateFromXbm (FILE * in);
+   BGD_EXPORT gdImagePtr gdImageCreateFromXpm (char *filename);
+   BGD_EXPORT gdImagePtr gdImageCreateFromXbm (FILE * in);
 
-  void gdImageDestroy (gdImagePtr im);
+   BGD_EXPORT void gdImageDestroy (gdImagePtr im);
 
 /* Replaces or blends with the background depending on the
 	most recent call to gdImageAlphaBlending and the
 	here. All other gd drawing functions pass through this call, 
 	allowing for many useful effects. */
 
-  void gdImageSetPixel (gdImagePtr im, int x, int y, int color);
+   BGD_EXPORT void gdImageSetPixel (gdImagePtr im, int x, int y, int color);
 
-  int gdImageGetPixel (gdImagePtr im, int x, int y);
+   BGD_EXPORT int gdImageGetPixel (gdImagePtr im, int x, int y);
 
-  void gdImageAABlend (gdImagePtr im);
+   BGD_EXPORT void gdImageAABlend (gdImagePtr im);
 
-  void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
+   BGD_EXPORT void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color);
 
 /* For backwards compatibility only. Use gdImageSetStyle()
 	for much more flexible line drawing. */
-  void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2,
+   BGD_EXPORT void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2,
 			  int color);
 /* Corners specified (not width and height). Upper left first, lower right
  	second. */
-  void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
+   BGD_EXPORT void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
 			 int color);
 /* Solid bar. Upper left corner first, lower right corner second. */
-  void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
+   BGD_EXPORT void gdImageFilledRectangle (gdImagePtr im, int x1, int y1, int x2, int y2,
 			       int color);
-  void gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2);
-  void gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P);
-  int gdImageBoundsSafe (gdImagePtr im, int x, int y);
-  void gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
+   BGD_EXPORT void gdImageSetClip(gdImagePtr im, int x1, int y1, int x2, int y2);
+   BGD_EXPORT void gdImageGetClip(gdImagePtr im, int *x1P, int *y1P, int *x2P, int *y2P);
+   BGD_EXPORT int gdImageBoundsSafe (gdImagePtr im, int x, int y);
+   BGD_EXPORT void gdImageChar (gdImagePtr im, gdFontPtr f, int x, int y, int c,
 		    int color);
-  void gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c,
+   BGD_EXPORT void gdImageCharUp (gdImagePtr im, gdFontPtr f, int x, int y, int c,
 		      int color);
-  void gdImageString (gdImagePtr im, gdFontPtr f, int x, int y,
+   BGD_EXPORT void gdImageString (gdImagePtr im, gdFontPtr f, int x, int y,
 		      unsigned char *s, int color);
-  void gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y,
+   BGD_EXPORT void gdImageStringUp (gdImagePtr im, gdFontPtr f, int x, int y,
 			unsigned char *s, int color);
-  void gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y,
+   BGD_EXPORT void gdImageString16 (gdImagePtr im, gdFontPtr f, int x, int y,
 			unsigned short *s, int color);
-  void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y,
+   BGD_EXPORT void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y,
 			  unsigned short *s, int color);
 
 /* 2.0.16: for thread-safe use of gdImageStringFT and friends,
   Otherwise it is invoked by the first thread to invoke
   gdImageStringFT, with a very small but real risk of a race condition. 
   Return 0 on success, nonzero on failure to initialize freetype. */
-int gdFontCacheSetup (void);
+ BGD_EXPORT int gdFontCacheSetup (void);
 
 /* Optional: clean up after application is done using fonts in 
-  gdImageStringFT(). */
-void gdFontCacheShutdown (void);
+ BGD_EXPORT   gdImageStringFT(). */
+ BGD_EXPORT void gdFontCacheShutdown (void);
 
 /* Calls gdImageStringFT. Provided for backwards compatibility only. */
-  char *gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
+  BGD_EXPORT char *gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
 			  double ptsize, double angle, int x, int y,
 			  char *string);
 
 /* FreeType 2 text output */
-  char *gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
+  BGD_EXPORT char *gdImageStringFT (gdImage * im, int *brect, int fg, char *fontlist,
 			 double ptsize, double angle, int x, int y,
 			 char *string);
 
 #define gdFTEX_Shift_JIS 1
 #define gdFTEX_Big5 2
 
-  char *gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
+  BGD_EXPORT char *gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist,
 			   double ptsize, double angle, int x, int y,
 			   char *string, gdFTStringExtraPtr strex);
 
   }
   gdPoint, *gdPointPtr;
 
-  void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c);
-  void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c);
+   BGD_EXPORT void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c);
+   BGD_EXPORT void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c);
 
 /* These functions still work with truecolor images, 
 	for which they never return error. */
-  int gdImageColorAllocate (gdImagePtr im, int r, int g, int b);
+   BGD_EXPORT int gdImageColorAllocate (gdImagePtr im, int r, int g, int b);
 /* gd 2.0: palette entries with non-opaque transparency are permitted. */
-  int gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a);
+   BGD_EXPORT int gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* Assumes opaque is the preferred alpha channel value */
-  int gdImageColorClosest (gdImagePtr im, int r, int g, int b);
+   BGD_EXPORT int gdImageColorClosest (gdImagePtr im, int r, int g, int b);
 /* Closest match taking all four parameters into account.
 	A slightly different color with the same transparency
 	beats the exact same color with radically different
 	transparency */
-  int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a);
+   BGD_EXPORT int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* An alternate method */
-  int gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b);
+   BGD_EXPORT int gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b);
 /* Returns exact, 100% opaque matches only */
-  int gdImageColorExact (gdImagePtr im, int r, int g, int b);
+   BGD_EXPORT int gdImageColorExact (gdImagePtr im, int r, int g, int b);
 /* Returns an exact match only, including alpha */
-  int gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a);
+   BGD_EXPORT int gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a);
 /* Opaque only */
-  int gdImageColorResolve (gdImagePtr im, int r, int g, int b);
+   BGD_EXPORT int gdImageColorResolve (gdImagePtr im, int r, int g, int b);
 /* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */
-  int gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a);
+   BGD_EXPORT int gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a);
 
 /* A simpler way to obtain an opaque truecolor value for drawing on a
 	truecolor image. Not for use with palette images! */
 	((g) << 8) + \
 	(b))
 
-  void gdImageColorDeallocate (gdImagePtr im, int color);
+   BGD_EXPORT void gdImageColorDeallocate (gdImagePtr im, int color);
 
 /* Converts a truecolor image to a palette-based image,
 	using a high-quality two-pass quantization routine
         conversion to palette is not great (for small images
         it can be negative) and the quality loss is ugly. */
 
-  void gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag,
+   BGD_EXPORT void gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag,
 				  int colorsWanted);
 
 /* Specifies a color index (if a palette image) or an
 	a truecolor image. Note that gdImageColorTransparent
 	is usually compatible with older browsers that
 	do not understand full alpha channels well. TBB */
-  void gdImageColorTransparent (gdImagePtr im, int color);
+   BGD_EXPORT void gdImageColorTransparent (gdImagePtr im, int color);
 
-  void gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src);
-  void gdImagePng (gdImagePtr im, FILE * out);
-  void gdImagePngCtx (gdImagePtr im, gdIOCtx * out);
+   BGD_EXPORT void gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src);
+   BGD_EXPORT void gdImagePng (gdImagePtr im, FILE * out);
+   BGD_EXPORT void gdImagePngCtx (gdImagePtr im, gdIOCtx * out);
   /* 2.0.12: Compression level: 0-9 or -1, where 0 is NO COMPRESSION at all,
      1 is FASTEST but produces larger files, 9 provides the best
      compression (smallest files) but takes a long time to compress, and
      -1 selects the default compiled into the zlib library. */
-  void gdImagePngEx (gdImagePtr im, FILE * out, int level);
-  void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level);
+   BGD_EXPORT void gdImagePngEx (gdImagePtr im, FILE * out, int level);
+   BGD_EXPORT void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * out, int level);
 
-  void gdImageWBMP (gdImagePtr image, int fg, FILE * out);
-  void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out);
+   BGD_EXPORT void gdImageWBMP (gdImagePtr image, int fg, FILE * out);
+   BGD_EXPORT void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx * out);
 
 /* Guaranteed to correctly free memory returned
 	by the gdImage*Ptr functions */
-  void gdFree (void *m);
+   BGD_EXPORT void gdFree (void *m);
 
 /* Best to free this memory with gdFree(), not free() */
   void *gdImageWBMPPtr (gdImagePtr im, int *size, int fg);
 
 /* 100 is highest quality (there is always a little loss with JPEG).
 	0 is lowest. 10 is about the lowest useful setting. */
-  void gdImageJpeg (gdImagePtr im, FILE * out, int quality);
-  void gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality);
+   BGD_EXPORT void gdImageJpeg (gdImagePtr im, FILE * out, int quality);
+   BGD_EXPORT void gdImageJpegCtx (gdImagePtr im, gdIOCtx * out, int quality);
 
 /* Best to free this memory with gdFree(), not free() */
-  void *gdImageJpegPtr (gdImagePtr im, int *size, int quality);
+  BGD_EXPORT void *gdImageJpegPtr (gdImagePtr im, int *size, int quality);
 
 /* A custom data sink. For backwards compatibility. Use
 	gdIOCtx instead. */
   }
   gdSink, *gdSinkPtr;
 
-  void gdImagePngToSink (gdImagePtr im, gdSinkPtr out);
+   BGD_EXPORT void gdImagePngToSink (gdImagePtr im, gdSinkPtr out);
 
-  void gdImageGd (gdImagePtr im, FILE * out);
-  void gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt);
+   BGD_EXPORT void gdImageGd (gdImagePtr im, FILE * out);
+   BGD_EXPORT void gdImageGd2 (gdImagePtr im, FILE * out, int cs, int fmt);
 
 /* Best to free this memory with gdFree(), not free() */
-  void *gdImagePngPtr (gdImagePtr im, int *size);
-  void *gdImagePngPtrEx (gdImagePtr im, int *size, int level);
+  BGD_EXPORT void *gdImagePngPtr (gdImagePtr im, int *size);
+  BGD_EXPORT void *gdImagePngPtrEx (gdImagePtr im, int *size, int level);
 
 /* Best to free this memory with gdFree(), not free() */
-  void *gdImageGdPtr (gdImagePtr im, int *size);
+  BGD_EXPORT void *gdImageGdPtr (gdImagePtr im, int *size);
 
 /* Best to free this memory with gdFree(), not free() */
-  void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size);
+  BGD_EXPORT void *gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size);
 
-  void gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h,
+   BGD_EXPORT void gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h,
 		       int color);
 
 /* Style is a bitwise OR ( | operator ) of these.
 #define gdNoFill 2
 #define gdEdged 4
 
-  void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s,
+   BGD_EXPORT void gdImageFilledArc (gdImagePtr im, int cx, int cy, int w, int h, int s,
 			 int e, int color, int style);
-  void gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
+   BGD_EXPORT void gdImageArc (gdImagePtr im, int cx, int cy, int w, int h, int s, int e,
 		   int color);
-  void gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h,
+   BGD_EXPORT void gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h,
 			     int color);
-  void gdImageFillToBorder (gdImagePtr im, int x, int y, int border,
+   BGD_EXPORT void gdImageFillToBorder (gdImagePtr im, int x, int y, int border,
 			    int color);
-  void gdImageFill (gdImagePtr im, int x, int y, int color);
-  void gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+   BGD_EXPORT void gdImageFill (gdImagePtr im, int x, int y, int color);
+   BGD_EXPORT void gdImageCopy (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 		    int srcX, int srcY, int w, int h);
-  void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+   BGD_EXPORT void gdImageCopyMerge (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 			 int srcX, int srcY, int w, int h, int pct);
-  void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX,
+   BGD_EXPORT void gdImageCopyMergeGray (gdImagePtr dst, gdImagePtr src, int dstX,
 			     int dstY, int srcX, int srcY, int w, int h,
 			     int pct);
 
 /* Stretches or shrinks to fit, as needed. Does NOT attempt
 	to average the entire set of source pixels that scale down onto the
 	destination pixel. */
-  void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
+   BGD_EXPORT void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
 			   int srcX, int srcY, int dstW, int dstH, int srcW,
 			   int srcH);
 
 	on modern hardware, except for some embedded devices. If the 
 	destination is a palette image, gdImageCopyResized is 
 	substituted automatically. */
-  void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX,
+   BGD_EXPORT void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX,
 			     int dstY, int srcX, int srcY, int dstW, int dstH,
 			     int srcW, int srcH);
 
         gdImageArc. Floating point destination center
         coordinates allow accurate rotation of
         objects of odd-numbered width or height. */
-  void gdImageCopyRotated (gdImagePtr dst,
+   BGD_EXPORT void gdImageCopyRotated (gdImagePtr dst,
 			   gdImagePtr src,
 			   double dstX, double dstY,
 			   int srcX, int srcY,
 			   int srcWidth, int srcHeight, int angle);
 
-  void gdImageSetBrush (gdImagePtr im, gdImagePtr brush);
-  void gdImageSetTile (gdImagePtr im, gdImagePtr tile);
-  void gdImageSetAntiAliased (gdImagePtr im, int c);
-  void gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend);
-  void gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels);
+   BGD_EXPORT void gdImageSetBrush (gdImagePtr im, gdImagePtr brush);
+   BGD_EXPORT void gdImageSetTile (gdImagePtr im, gdImagePtr tile);
+   BGD_EXPORT void gdImageSetAntiAliased (gdImagePtr im, int c);
+   BGD_EXPORT void gdImageSetAntiAliasedDontBlend (gdImagePtr im, int c, int dont_blend);
+   BGD_EXPORT void gdImageSetStyle (gdImagePtr im, int *style, int noOfPixels);
 /* Line thickness (defaults to 1). Affects lines, ellipses, 
 	rectangles, polygons and so forth. */
-  void gdImageSetThickness (gdImagePtr im, int thickness);
+   BGD_EXPORT void gdImageSetThickness (gdImagePtr im, int thickness);
 /* On or off (1 or 0) for all three of these. */
-  void gdImageInterlace (gdImagePtr im, int interlaceArg);
-  void gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg);
-  void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg);
+   BGD_EXPORT void gdImageInterlace (gdImagePtr im, int interlaceArg);
+   BGD_EXPORT void gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg);
+   BGD_EXPORT void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg);
 
 /* Macros to access information about images. */
 
 
 /* I/O Support routines. */
 
-  gdIOCtx *gdNewFileCtx (FILE *);
-  gdIOCtx *gdNewDynamicCtx (int, void *);
-  gdIOCtx *gdNewSSCtx (gdSourcePtr in, gdSinkPtr out);
-  void *gdDPExtractData (struct gdIOCtx *ctx, int *size);
+  BGD_EXPORT gdIOCtx *gdNewFileCtx (FILE *);
+  BGD_EXPORT gdIOCtx *gdNewDynamicCtx (int, void *);
+  BGD_EXPORT gdIOCtx *gdNewSSCtx (gdSourcePtr in, gdSinkPtr out);
+  BGD_EXPORT void *gdDPExtractData (struct gdIOCtx *ctx, int *size);
 
 #define GD2_CHUNKSIZE           128
 #define GD2_CHUNKSIZE_MIN	64
 #define GD2_FMT_COMPRESSED      2
 
 /* Image comparison definitions */
-  int gdImageCompare (gdImagePtr im1, gdImagePtr im2);
+   BGD_EXPORT int gdImageCompare (gdImagePtr im1, gdImagePtr im2);
 
 #define GD_CMP_IMAGE		1	/* Actual image IS different */
 #define GD_CMP_NUM_COLORS	2	/* Number of Colours in pallette differ */
 void Putword (int w, gdIOCtx * ctx);
 void Putchar (int c, gdIOCtx * ctx);
 
-void gdPutC (const unsigned char c, gdIOCtx * ctx);
-int gdPutBuf (const void *, int, gdIOCtx *);
-void gdPutWord (int w, gdIOCtx * ctx);
-void gdPutInt (int w, gdIOCtx * ctx);
-
-int gdGetC (gdIOCtx * ctx);
-int gdGetBuf (void *, int, gdIOCtx *);
-int gdGetByte (int *result, gdIOCtx * ctx);
-int gdGetWord (int *result, gdIOCtx * ctx);
-int gdGetInt (int *result, gdIOCtx * ctx);
-
-int gdSeek (gdIOCtx * ctx, const int);
-long gdTell (gdIOCtx * ctx);
+ void gdPutC (const unsigned char c, gdIOCtx * ctx);
+ int gdPutBuf (const void *, int, gdIOCtx *);
+ void gdPutWord (int w, gdIOCtx * ctx);
+ void gdPutInt (int w, gdIOCtx * ctx);
+
+ int gdGetC (gdIOCtx * ctx);
+ int gdGetBuf (void *, int, gdIOCtx *);
+ int gdGetByte (int *result, gdIOCtx * ctx);
+ int gdGetWord (int *result, gdIOCtx * ctx);
+ int gdGetInt (int *result, gdIOCtx * ctx);
+
+ int gdSeek (gdIOCtx * ctx, const int);
+ long gdTell (gdIOCtx * ctx);
 
 #endif
 			       gdCacheFetchFn_t gdCacheFetch,
 			       gdCacheReleaseFn_t gdCacheRelease);
 
-void gdCacheDelete (gdCache_head_t * head);
+ BGD_EXPORT void gdCacheDelete (gdCache_head_t * head);
 
 void *gdCacheGet (gdCache_head_t * head, void *keydata);
   gdFontGiantData
 };
 
-gdFontPtr gdFontGiant = &gdFontGiantRep;
+BGD_EXPORT gdFontPtr gdFontGiant = &gdFontGiantRep;
 
 /* This file has not been truncated. */
 
 #include "gd.h"
 
-  extern gdFontPtr gdFontGiant;
+   BGD_EXPORT  gdFontPtr gdFontGiant;
 
 #ifdef __cplusplus
 }
   gdFontLargeData
 };
 
-gdFontPtr gdFontLarge = &gdFontLargeRep;
+BGD_EXPORT gdFontPtr gdFontLarge = &gdFontLargeRep;
 
 /* This file has not been truncated. */
 
 #include "gd.h"
 
-  extern gdFontPtr gdFontLarge;
+   BGD_EXPORT  gdFontPtr gdFontLarge;
 
 #ifdef __cplusplus
 }
   gdFontMediumBoldData
 };
 
-gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
+BGD_EXPORT gdFontPtr gdFontMediumBold = &gdFontMediumBoldRep;
 
 /* This file has not been truncated. */
 
 #include "gd.h"
 
-  extern gdFontPtr gdFontMediumBold;
+   BGD_EXPORT  gdFontPtr gdFontMediumBold;
 
 #ifdef __cplusplus
 }
   gdFontSmallData
 };
 
-gdFontPtr gdFontSmall = &gdFontSmallRep;
+BGD_EXPORT gdFontPtr gdFontSmall = &gdFontSmallRep;
 
 /* This file has not been truncated. */
 
 #include "gd.h"
 
-  extern gdFontPtr gdFontSmall;
+   BGD_EXPORT  gdFontPtr gdFontSmall;
 
 #ifdef __cplusplus
 }
   gdFontTinyData
 };
 
-gdFontPtr gdFontTiny = &gdFontTinyRep;
+BGD_EXPORT gdFontPtr gdFontTiny = &gdFontTinyRep;
 
 /* This file has not been truncated. */
 
 #include "gd.h"
 
-  extern gdFontPtr gdFontTiny;
+   BGD_EXPORT  gdFontPtr gdFontTiny;
 
 #ifdef __cplusplus
 }
 
 /*
  * The character (space) used to separate alternate fonts in the
- * fontlist parameter to gdImageStringFT.
+ * fontlist parameter to gdImageStringFT. 2.0.18: space was a
+ * poor choice for this.
  */
-#define LISTSEPARATOR " "
+#define LISTSEPARATOR ";"
 
 /*
  * DEFAULT_FONTPATH and PATHSEPARATOR are host type dependent and
 	of the original has been remapped to rho (distance from center).
 	This is known as a "polar coordinate transform." */
 
-gdImagePtr gdImageSquareToCircle(gdImagePtr im, int radius);
+ BGD_EXPORT gdImagePtr gdImageSquareToCircle(gdImagePtr im, int radius);
 
 /* Draws the text 'top' and 'bottom' on 'im', curved along the
 	edge of a circle of radius 'radius', with its
 
 	Returns 0 on success, or an error string. */	
 
-char *gdImageStringFTCircle(
+BGD_EXPORT char *gdImageStringFTCircle(
 	gdImagePtr im,
 	int cx,
 	int cy,
   * Leaves transparency/alpha-channel untouched
   */
 
-void gdImageSharpen (gdImagePtr im, int pct);
+ BGD_EXPORT void gdImageSharpen (gdImagePtr im, int pct);
 
 #endif /* GDFX_H */
 
 
 /* TBB: strtok_r is not universal; provide an implementation of it. */
 
-extern char *gd_strtok_r (char *s, char *sep, char **state);
+ BGD_EXPORT  char *gd_strtok_r (char *s, char *sep, char **state);
 
 /* These functions wrap memory management. gdFree is
 	in gd.h, where callers can utilize it to correctly
 /* 2.0.16: portable mutex support for thread safety. */
 
 #ifdef WIN32
+/* 2.0.18: must include windows.h to get CRITICAL_SECTION. */
+#include <windows.h>
 #define gdMutexDeclare(x) CRITICAL_SECTION x
 #define gdMutexSetup(x) InitializeCriticalSection(&x)
 #define gdMutexShutdown(x) DeleteCriticalSection(&x)
 <html>
 <head>
-<TITLE>gd 2.0.17</TITLE>
+<TITLE>gd 2.0.18</TITLE>
 </head>
 <body bgcolor="#FFFFFF">
 <!-- BANNER HERE -->
-<h1>This is gd 2.0.17.</h1>
+<h1>This is gd 2.0.18.</h1>
 <p>
-<H2>gd 2.0.17</H2>
+<H2>gd 2.0.18</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
 of this document</A>.</H3>
 <blockquote>
-<strong>UPGRADING USERS: READ THIS FIRST!</strong>
+<strong>UPGRADING UNIX USERS: READ THIS FIRST!</strong>
 Modern versions of gd install by default to /usr/local/lib and
 /usr/local/include. If you already have an older version of gd
 in /usr/lib and /usr/include, you may wish to use:
 new installation overwrites the old.
 <p>
 <strong>ABOUT GD AND GIF:</strong>
-gd 2.0.17 creates PNG, JPEG and WBMP images, not GIF images. This is a 
+gd 2.0.18 creates PNG, JPEG and WBMP images, not GIF images. This is a 
 good thing.  PNG is a more compact format, and full compression is
 available.  JPEG works best with photographic images, and is still
 more compatible with the major Web browsers than even PNG is. WBMP is
 modern image formats such as PNG and JPEG as soon as possible.
 
 <p>
-gd 2.0.17 <strong>requires</strong> that the following libraries 
-also be installed, in order to produce the related image formats.
+When building from soruce, gd 2.0.18 <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.
 You may skip libraries associated with formats you do not use:
 <p>
 libpng (see the <a href="http://www.libpng.org/pub/png/">libpng home page</a>), if you want PNG
 <H3>Table of Contents</H3>
 <UL>
 <LI><A HREF="#notice">Credits and license terms</A>
-<LI><A HREF="#whatsnew2.0.17">What's new in version "XYZ" of GD?</A>
+<LI><A HREF="#whatsnew2.0.18">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>
 <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.17.
+with 2.0.18.
 <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.17; see the
+to patch PHP 4.2.3 for use with gd 2.0.18; 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
 <li><a href="http://martin.gleeson.com/fly/">fly</a>, by Martin Gleeson
 </ul>
 <P>
+<A NAME="whatsnew2.0.18"><H3>What's new in version 2.0.18?</H3></A>
+<P>
+<ul>
+<li>Win32 binary distribution of bgd.dll now available.
+<li>Semicolon rather than space used as the default separator of
+alternative font file paths in <a href="#gdImageStringFT">gdImageStringFT</a>,
+for better compatibility with Windows and other environments where
+spaces are common in paths.
+<li>The circletexttest demo no longer fails to compile when JPEG
+support happens to be absent.
+</ul>
+<P>
 <A NAME="whatsnew2.0.17"><H3>What's new in version 2.0.17?</H3></A>
 <P>
 Minor compilation and packaging problems with 2.0.16 were corrected.
 saving of alpha channel information to the file instead.
 <P>
 <A NAME="getgd"><H3>How do I get gd?</H3></A>
+<h4>Binaries (DLL for Windows programmers):</h4>
 <ul>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.17.tar.gz">Gzipped Tar File (Unix)</a>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.17.zip">.ZIP File (Windows)</a>
+<li><a href="http://www.boutell.com/gd/http/bgd.zip">.ZIP File of DLL, Headers, Et Cetera</a>
+</ul>
+<h4>Source Code:</h4>
+<ul>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.18.tar.gz">Gzipped Tar File (Unix)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.18.zip">.ZIP File of SOURCE CODE (Windows)</a>
 </ul>
 <P>
 <A NAME="buildgd"><H3>How do I build gd?</H3></A>
-<P>
+<blockquote>
+Win32 DLL users will not need to read this section. Simply use
+the provided DLL for your programming. You can build an MSVC
+import library, if needed, using the provided batch file
+<code>makemsvcimport.bat</code>.
+</blockquote>
 In order to build gd, you must first unpack the archive you have
 downloaded. If you are not familiar with <code>tar</code> and
 <code>gunzip</code> (Unix) or <code>ZIP</code> (Windows), please
 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.17".
+Unpacking the archive will produce a directory called "gd-2.0.18".
 <p>
 <h4>For Unix</h4>
-<code>cd</code> to the 2.0.17 directory and type:
+<code>cd</code> to the 2.0.18 directory and type:
 <p>
 <code>./configure</code>
 <P>
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.