home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gd201.zip / gd-2.0.1 / gd.h < prev    next >
C/C++ Source or Header  |  2001-04-03  |  19KB  |  497 lines

  1. #ifndef GD_H
  2. #define GD_H 1
  3.  
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7.  
  8. /* default fontpath for unix systems */
  9. #define DEFAULT_FONTPATH "/usr/share/fonts/truetype"
  10. #define PATHSEPARATOR ":"
  11.  
  12. /* gd.h: declarations file for the graphic-draw module.
  13.  * Permission to use, copy, modify, and distribute this software and its
  14.  * documentation for any purpose and without fee is hereby granted, provided
  15.  * that the above copyright notice appear in all copies and that both that
  16.  * copyright notice and this permission notice appear in supporting
  17.  * documentation.  This software is provided "AS IS." Thomas Boutell and
  18.  * Boutell.Com, Inc. disclaim all warranties, either express or implied, 
  19.  * including but not limited to implied warranties of merchantability and 
  20.  * fitness for a particular purpose, with respect to this code and accompanying
  21.  * documentation. */
  22.  
  23. /* stdio is needed for file I/O. */
  24. #include <stdio.h>
  25. #include "gd_io.h"
  26.  
  27. /* The maximum number of palette entries in palette-based images.
  28.     In the wonderful new world of gd 2.0, you can of course have
  29.     many more colors when using truecolor mode. */
  30.  
  31. #define gdMaxColors 256
  32.  
  33. /* Image type. See functions below; you will not need to change
  34.     the elements directly. Use the provided macros to
  35.     access sx, sy, the color table, and colorsTotal for 
  36.     read-only purposes. */
  37.  
  38. /* If 'truecolor' is set true, the image is truecolor; 
  39.     pixels are represented by integers, which
  40.     must be 32 bits wide or more. 
  41.  
  42.     True colors are repsented as follows:
  43.  
  44.     ARGB
  45.  
  46.     Where 'A' (alpha channel) occupies only the
  47.     LOWER 7 BITS of the MSB. This very small 
  48.     loss of alpha channel resolution allows gd 2.x
  49.     to keep backwards compatibility by allowing
  50.     signed integers to be used to represent colors,
  51.     and negative numbers to represent special cases,
  52.     just as in gd 1.x. */
  53.  
  54. #define gdAlphaMax 127
  55. #define gdAlphaOpaque 0
  56. #define gdAlphaTransparent 127
  57. #define gdRedMax 255
  58. #define gdGreenMax 255
  59. #define gdBlueMax 255
  60. #define gdTrueColorGetAlpha(c) (((c) & 0x7F000000) >> 24)
  61. #define gdTrueColorGetRed(c) (((c) & 0xFF0000) >> 16)
  62. #define gdTrueColorGetGreen(c) (((c) & 0x00FF00) >> 8)
  63. #define gdTrueColorGetBlue(c) ((c) & 0x0000FF)
  64.  
  65. /* This function accepts truecolor pixel values only. The 
  66.     source color is composited with the destination color
  67.     based on the alpha channel value of the source color.
  68.     The resulting color is opaque. */
  69.  
  70. int gdAlphaBlend(int dest, int src);
  71.  
  72. typedef struct gdImageStruct {
  73.     /* Palette-based image pixels */
  74.     unsigned char ** pixels;
  75.     int sx;
  76.     int sy;
  77.     /* These are valid in palette images only. See also
  78.         'alpha', which appears later in the structure to
  79.         preserve binary backwards compatibility */
  80.     int colorsTotal;
  81.     int red[gdMaxColors];
  82.     int green[gdMaxColors];
  83.     int blue[gdMaxColors]; 
  84.     int open[gdMaxColors];
  85.     /* For backwards compatibility, this is set to the
  86.         first palette entry with 100% transparency,
  87.         and is also set and reset by the 
  88.         gdImageColorTransparent function. Newer
  89.         applications can allocate palette entries
  90.         with any desired level of transparency; however,
  91.         bear in mind that many viewers, notably
  92.         many web browsers, fail to implement
  93.         full alpha channel for PNG and provide
  94.         support for full opacity or transparency only. */
  95.     int transparent;
  96.     int *polyInts;
  97.     int polyAllocated;
  98.     struct gdImageStruct *brush;
  99.     struct gdImageStruct *tile;    
  100.     int brushColorMap[gdMaxColors];
  101.     int tileColorMap[gdMaxColors];
  102.     int styleLength;
  103.     int stylePos;
  104.     int *style;
  105.     int interlace;
  106.     /* New in 2.0: thickness of line. Initialized to 1. */
  107.     int thick;
  108.     /* New in 2.0: alpha channel for palettes. Note that only
  109.         Macintosh Internet Explorer and (possibly) Netscape 6
  110.         really support multiple levels of transparency in
  111.         palettes, to my knowledge, as of 2/15/01. Most
  112.         common browsers will display 100% opaque and
  113.         100% transparent correctly, and do something 
  114.         unpredictable and/or undesirable for levels
  115.         in between. TBB */
  116.     int alpha[gdMaxColors]; 
  117.     /* Truecolor flag and pixels. New 2.0 fields appear here at the
  118.         end to minimize breakage of existing object code. */
  119.     int trueColor;
  120.     int ** tpixels;
  121.     /* Should alpha channel be copied, or applied, each time a
  122.         pixel is drawn? This applies to truecolor images only.
  123.         No attempt is made to alpha-blend in palette images,
  124.         even if semitransparent palette entries exist. 
  125.         To do that, build your image as a truecolor image,
  126.         then quantize down to 8 bits. */
  127.     int alphaBlendingFlag;
  128.     /* Should the alpha channel of the image be saved? This affects
  129.         PNG at the moment; other future formats may also
  130.         have that capability. JPEG doesn't. */
  131.     int saveAlphaFlag;
  132. } gdImage;
  133.  
  134. typedef gdImage * gdImagePtr;
  135.  
  136. typedef struct {
  137.     /* # of characters in font */
  138.     int nchars;
  139.     /* First character is numbered... (usually 32 = space) */
  140.     int offset;
  141.     /* Character width and height */
  142.     int w;
  143.     int h;
  144.     /* Font data; array of characters, one row after another.
  145.         Easily included in code, also easily loaded from
  146.         data files. */
  147.     char *data;
  148. } gdFont;
  149.  
  150. /* Text functions take these. */
  151. typedef gdFont *gdFontPtr;
  152.  
  153. /* For backwards compatibility only. Use gdImageSetStyle()
  154.     for MUCH more flexible line drawing. Also see
  155.     gdImageSetBrush(). */
  156. #define gdDashSize 4
  157.  
  158. /* Special colors. */
  159.  
  160. #define gdStyled (-2)
  161. #define gdBrushed (-3)
  162. #define gdStyledBrushed (-4)
  163. #define gdTiled (-5)
  164.  
  165. /* NOT the same as the transparent color index.
  166.     This is used in line styles only. */
  167. #define gdTransparent (-6)
  168.  
  169. /* Functions to manipulate images. */
  170.  
  171. /* Creates a palette-based image (up to 256 colors). */
  172. gdImagePtr gdImageCreate(int sx, int sy);
  173.  
  174. /* An alternate name for the above (2.0). */
  175. #define gdImageCreatePalette gdImageCreate
  176.  
  177. /* Creates a truecolor image (millions of colors). */
  178. gdImagePtr gdImageCreateTrueColor(int sx, int sy);
  179.  
  180. /* Creates an image from various file types. These functions
  181.     return a palette or truecolor image based on the
  182.     nature of the file being loaded. Truecolor PNG
  183.     stays truecolor; palette PNG stays palette-based;
  184.     JPEG is always truecolor. */
  185. gdImagePtr gdImageCreateFromPng(FILE *fd);
  186. gdImagePtr gdImageCreateFromPngCtx(gdIOCtxPtr in);
  187. gdImagePtr gdImageCreateFromWBMP(FILE *inFile);
  188. gdImagePtr gdImageCreateFromWBMPCtx(gdIOCtx *infile); 
  189. gdImagePtr gdImageCreateFromJpeg(FILE *infile);
  190. gdImagePtr gdImageCreateFromJpegCtx(gdIOCtx *infile);
  191.  
  192. /* A custom data source. */
  193. /* The source function must return -1 on error, otherwise the number
  194.         of bytes fetched. 0 is EOF, not an error! */
  195. /* context will be passed to your source function. */
  196.  
  197. typedef struct {
  198.         int (*source) (void *context, char *buffer, int len);
  199.         void *context;
  200. } gdSource, *gdSourcePtr;
  201.  
  202. gdImagePtr gdImageCreateFromPngSource(gdSourcePtr in);
  203.  
  204. gdImagePtr gdImageCreateFromGd(FILE *in);
  205. gdImagePtr gdImageCreateFromGdCtx(gdIOCtxPtr in);
  206.  
  207. gdImagePtr gdImageCreateFromGd2(FILE *in);
  208. gdImagePtr gdImageCreateFromGd2Ctx(gdIOCtxPtr in);
  209.  
  210. gdImagePtr gdImageCreateFromGd2Part(FILE *in, int srcx, int srcy, int w, int h);
  211. gdImagePtr gdImageCreateFromGd2PartCtx(gdIOCtxPtr in, int srcx, int srcy, int w, int h);
  212.  
  213. gdImagePtr gdImageCreateFromXbm(FILE *fd);
  214.  
  215. void gdImageDestroy(gdImagePtr im);
  216.  
  217. /* Replaces or blends with the background depending on the
  218.     most recent call to gdImageAlphaBlending and the
  219.     alpha channel value of 'color'; default is to overwrite. 
  220.     Tiling and line styling are also implemented
  221.     here. All other gd drawing functions pass through this call, 
  222.     allowing for many useful effects. */
  223.     
  224. void gdImageSetPixel(gdImagePtr im, int x, int y, int color);
  225.  
  226. int gdImageGetPixel(gdImagePtr im, int x, int y);
  227.  
  228. void gdImageLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
  229.  
  230. /* For backwards compatibility only. Use gdImageSetStyle()
  231.     for much more flexible line drawing. */
  232. void gdImageDashedLine(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
  233. /* Corners specified (not width and height). Upper left first, lower right
  234.      second. */
  235. void gdImageRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
  236. /* Solid bar. Upper left corner first, lower right corner second. */
  237. void gdImageFilledRectangle(gdImagePtr im, int x1, int y1, int x2, int y2, int color);
  238. int gdImageBoundsSafe(gdImagePtr im, int x, int y);
  239. void gdImageChar(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color);
  240. void gdImageCharUp(gdImagePtr im, gdFontPtr f, int x, int y, int c, int color);
  241. void gdImageString(gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color);
  242. void gdImageStringUp(gdImagePtr im, gdFontPtr f, int x, int y, unsigned char *s, int color);
  243. void gdImageString16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color);
  244. void gdImageStringUp16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short *s, int color);
  245.  
  246. /* Calls gdImageStringFT. Provided for backwards compatibility only. */
  247. char *gdImageStringTTF(gdImage *im, int *brect, int fg, char *fontlist,
  248.                 double ptsize, double angle, int x, int y, char *string);
  249.  
  250. /* FreeType 2 text output */
  251. char *gdImageStringFT(gdImage *im, int *brect, int fg, char *fontlist,
  252.                 double ptsize, double angle, int x, int y, char *string);
  253.  
  254. /* Point type for use in polygon drawing. */
  255. typedef struct {
  256.     int x, y;
  257. } gdPoint, *gdPointPtr;
  258.  
  259. void gdImagePolygon(gdImagePtr im, gdPointPtr p, int n, int c);
  260. void gdImageFilledPolygon(gdImagePtr im, gdPointPtr p, int n, int c);
  261.  
  262. /* These functions still work with truecolor images, 
  263.     for which they never return error. */
  264. int gdImageColorAllocate(gdImagePtr im, int r, int g, int b);
  265. /* gd 2.0: palette entries with non-opaque transparency are permitted. */
  266. int gdImageColorAllocateAlpha(gdImagePtr im, int r, int g, int b, int a);
  267. /* Assumes opaque is the preferred alpha channel value */
  268. int gdImageColorClosest(gdImagePtr im, int r, int g, int b);
  269. /* Closest match taking all four parameters into account.
  270.     A slightly different color with the same transparency
  271.     beats the exact same color with radically different
  272.     transparency */
  273. int gdImageColorClosestAlpha(gdImagePtr im, int r, int g, int b, int a);
  274. /* Returns exact, 100% opaque matches only */
  275. int gdImageColorExact(gdImagePtr im, int r, int g, int b);
  276. /* Returns an exact match only, including alpha */
  277. int gdImageColorExactAlpha(gdImagePtr im, int r, int g, int b, int a);
  278. /* Opaque only */
  279. int gdImageColorResolve(gdImagePtr im, int r, int g, int b);
  280. /* Based on gdImageColorExactAlpha and gdImageColorClosestAlpha */
  281. int gdImageColorResolveAlpha(gdImagePtr im, int r, int g, int b, int a);
  282.  
  283. /* A simpler way to obtain an opaque truecolor value for drawing on a
  284.     truecolor image. Not for use with palette images! */
  285.  
  286. #define gdTrueColor(r, g, b) (((r) << 16) + \
  287.     ((g) << 8) + \
  288.     (b))
  289.  
  290. /* Returns a truecolor value with an alpha channel component.
  291.     gdAlphaMax (127, **NOT 255**) is transparent, 0 is completely
  292.     opaque. */
  293.  
  294. #define gdTrueColorAlpha(r, g, b, a) (((a) << 24) + \
  295.     ((r) << 16) + \
  296.     ((g) << 8) + \
  297.     (b))
  298.  
  299. void gdImageColorDeallocate(gdImagePtr im, int color);
  300.  
  301. /* Converts a truecolor image to a palette-based image,
  302.     using a high-quality two-pass quantization routine
  303.     which attempts to preserve alpha channel information
  304.     as well as R/G/B color information when creating
  305.     a palette. If ditherFlag is set, the image will be
  306.     dithered to approximate colors better, at the expense
  307.     of some obvious "speckling." colorsWanted can be
  308.     anything up to 256. If the original source image
  309.     includes photographic information or anything that
  310.     came out of a JPEG, 256 is strongly recommended.
  311.  
  312.     Better yet, don't use this function -- write real
  313.     truecolor PNGs and JPEGs. The disk space gain of
  314.         conversion to palette is not great (for small images
  315.         it can be negative) and the quality loss is ugly. */
  316.  
  317. void gdImageTrueColorToPalette(gdImagePtr im, int ditherFlag, int colorsWanted);
  318.  
  319. /* Specifies a color index (if a palette image) or an
  320.     RGB color (if a truecolor image) which should be
  321.     considered 100% transparent. FOR TRUECOLOR IMAGES,
  322.     THIS IS IGNORED IF AN ALPHA CHANNEL IS BEING
  323.     SAVED. Use gdImageSaveAlpha(im, 0); to
  324.     turn off the saving of a full alpha channel in
  325.     a truecolor image. Note that gdImageColorTransparent
  326.     is usually compatible with older browsers that
  327.     do not understand full alpha channels well. TBB */
  328. void gdImageColorTransparent(gdImagePtr im, int color);
  329.  
  330. void gdImagePaletteCopy(gdImagePtr dst, gdImagePtr src);
  331. void gdImagePng(gdImagePtr im, FILE *out);
  332. void gdImagePngCtx(gdImagePtr im, gdIOCtx *out);
  333.  
  334. void gdImageWBMP(gdImagePtr image, int fg, FILE *out);
  335. void gdImageWBMPCtx(gdImagePtr image, int fg, gdIOCtx *out);
  336.  
  337. /* Guaranteed to correctly free memory returned
  338.     by the gdImage*Ptr functions */
  339. void gdFree(void *m);
  340.  
  341. /* Best to free this memory with gdFree(), not free() */
  342. void *gdImageWBMPPtr(gdImagePtr im, int *size, int fg);
  343.  
  344. void gdImageJpeg(gdImagePtr im, FILE *out, int quality);
  345. void gdImageJpegCtx(gdImagePtr im, gdIOCtx *out, int quality);
  346.  
  347. /* Best to free this memory with gdFree(), not free() */
  348. void *gdImageJpegPtr(gdImagePtr im, int *size, int quality);
  349.  
  350. /* A custom data sink. For backwards compatibility. Use
  351.     gdIOCtx instead. */
  352. /* The sink function must return -1 on error, otherwise the number
  353.         of bytes written, which must be equal to len. */
  354. /* context will be passed to your sink function. */
  355. typedef struct {
  356.         int (*sink) (void *context, const char *buffer, int len);
  357.         void *context;
  358. } gdSink, *gdSinkPtr;
  359.  
  360. void gdImagePngToSink(gdImagePtr im, gdSinkPtr out);
  361.  
  362. void gdImageGd(gdImagePtr im, FILE *out);
  363. void gdImageGd2(gdImagePtr im, FILE *out, int cs, int fmt);
  364.  
  365. /* Best to free this memory with gdFree(), not free() */
  366. void* gdImagePngPtr(gdImagePtr im, int *size);
  367.  
  368. /* Best to free this memory with gdFree(), not free() */
  369. void* gdImageGdPtr(gdImagePtr im, int *size);
  370.  
  371. /* Best to free this memory with gdFree(), not free() */
  372. void* gdImageGd2Ptr(gdImagePtr im, int cs, int fmt, int *size);
  373.  
  374. void gdImageEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color);
  375.  
  376. /* Style is a bitwise OR ( | operator ) of these.
  377.     gdArc and gdChord are mutually exclusive;
  378.     gdChord just connects the starting and ending
  379.     angles with a straight line, while gdArc produces
  380.     a rounded edge. gdPie is a synonym for gdArc. 
  381.     gdNoFill indicates that the arc or chord should be
  382.     outlined, not filled. gdEdged, used together with
  383.     gdNoFill, indicates that the beginning and ending
  384.     angles should be connected to the center; this is
  385.     a good way to outline (rather than fill) a
  386.     'pie slice'. */
  387. #define gdArc   0
  388. #define gdPie   gdArc
  389. #define gdChord 1
  390. #define gdNoFill 2
  391. #define gdEdged 4
  392.  
  393. void gdImageFilledArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color, int style);
  394. void gdImageArc(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color);
  395. void gdImageFilledEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color);
  396. void gdImageFillToBorder(gdImagePtr im, int x, int y, int border, int color);
  397. void gdImageFill(gdImagePtr im, int x, int y, int color);
  398. void gdImageCopy(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int w, int h);
  399. void gdImageCopyMerge(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, 
  400.             int srcX, int srcY, int w, int h, int pct);
  401. void gdImageCopyMergeGray(gdImagePtr dst, gdImagePtr src, int dstX, int dstY,
  402.                         int srcX, int srcY, int w, int h, int pct);
  403.  
  404. /* Stretches or shrinks to fit, as needed. Does NOT attempt
  405.     to average the entire set of source pixels that scale down onto the
  406.     destination pixel. */
  407. void gdImageCopyResized(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);
  408.  
  409. /* gd 2.0: stretches or shrinks to fit, as needed. When called with a
  410.     truecolor destination image, this function averages the
  411.     entire set of source pixels that scale down onto the
  412.     destination pixel, taking into account what portion of the
  413.     destination pixel each source pixel represents. This is a
  414.     floating point operation, but this is not a performance issue
  415.     on modern hardware, except for some embedded devices. If the 
  416.     destination is a palette image, gdImageCopyResized is 
  417.     substituted automatically. */
  418. void gdImageCopyResampled(gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH);
  419.  
  420. void gdImageSetBrush(gdImagePtr im, gdImagePtr brush);
  421. void gdImageSetTile(gdImagePtr im, gdImagePtr tile);
  422. void gdImageSetStyle(gdImagePtr im, int *style, int noOfPixels);
  423. /* Line thickness (defaults to 1). Affects lines, ellipses, 
  424.     rectangles, polygons and so forth. */
  425. void gdImageSetThickness(gdImagePtr im, int thickness);
  426. /* On or off (1 or 0) for all three of these. */
  427. void gdImageInterlace(gdImagePtr im, int interlaceArg);
  428. void gdImageAlphaBlending(gdImagePtr im, int alphaBlendingArg);
  429. void gdImageSaveAlpha(gdImagePtr im, int saveAlphaArg);
  430.  
  431. /* Macros to access information about images. */
  432.  
  433. /* Returns nonzero if the image is a truecolor image,
  434.     zero for a palette image. */
  435.  
  436. #define gdImageTrueColor(im) ((im)->trueColor)
  437.  
  438. #define gdImageSX(im) ((im)->sx)
  439. #define gdImageSY(im) ((im)->sy)
  440. #define gdImageColorsTotal(im) ((im)->colorsTotal)
  441. #define gdImageRed(im, c) ((im)->trueColor ? gdTrueColorGetRed(c) : \
  442.     (im)->red[(c)])
  443. #define gdImageGreen(im, c) ((im)->trueColor ? gdTrueColorGetGreen(c) : \
  444.     (im)->green[(c)])
  445. #define gdImageBlue(im, c) ((im)->trueColor ? gdTrueColorGetBlue(c) : \
  446.     (im)->blue[(c)])
  447. #define gdImageAlpha(im, c) ((im)->trueColor ? gdTrueColorGetAlpha(c) : \
  448.     (im)->alpha[(c)])
  449. #define gdImageGetTransparent(im) ((im)->transparent)
  450. #define gdImageGetInterlaced(im) ((im)->interlace)
  451.  
  452. /* These macros provide direct access to pixels in
  453.     palette-based and truecolor images, respectively.
  454.     If you use these macros, you must perform your own
  455.     bounds checking. Use of the macro for the correct type
  456.     of image is also your responsibility. */
  457. #define gdImagePalettePixel(im, x, y) (im)->pixels[(y)][(x)]
  458. #define gdImageTrueColorPixel(im, x, y) (im)->tpixels[(y)][(x)]
  459.  
  460. /* I/O Support routines. */
  461.  
  462. gdIOCtx* gdNewFileCtx(FILE*);
  463. gdIOCtx* gdNewDynamicCtx(int, void*);
  464. gdIOCtx* gdNewSSCtx(gdSourcePtr in, gdSinkPtr out);
  465. void* gdDPExtractData(struct gdIOCtx* ctx, int *size);
  466.  
  467. #define GD2_CHUNKSIZE           128 
  468. #define GD2_CHUNKSIZE_MIN    64
  469. #define GD2_CHUNKSIZE_MAX       4096
  470.  
  471. #define GD2_VERS                2
  472. #define GD2_ID                  "gd2"
  473. #define GD2_FMT_RAW             1
  474. #define GD2_FMT_COMPRESSED      2
  475.  
  476. /* Image comparison definitions */
  477. int gdImageCompare(gdImagePtr im1, gdImagePtr im2);
  478.  
  479. #define GD_CMP_IMAGE        1    /* Actual image IS different */
  480. #define GD_CMP_NUM_COLORS    2    /* Number of Colours in pallette differ */
  481. #define GD_CMP_COLOR        4    /* Image colours differ */
  482. #define GD_CMP_SIZE_X        8    /* Image width differs */
  483. #define GD_CMP_SIZE_Y        16    /* Image heights differ */
  484. #define GD_CMP_TRANSPARENT    32    /* Transparent colour */
  485. #define GD_CMP_BACKGROUND    64    /* Background colour */
  486. #define GD_CMP_INTERLACE    128    /* Interlaced setting */
  487. #define GD_CMP_TRUECOLOR    256    /* Truecolor vs palette differs */
  488.  
  489. /* resolution affects ttf font rendering, particularly hinting */
  490. #define GD_RESOLUTION           96      /* pixels per inch */
  491.  
  492. #ifdef __cplusplus
  493. }
  494. #endif
  495.  
  496. #endif /* GD_H */
  497.