w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

gd.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include "gd_io.h"
#include "gdfx.h"
Include dependency graph for gd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  gdImageStruct
 
struct  gdPointF
 
struct  gdFont
 
struct  gdSource
 
struct  gdFTStringExtra
 
struct  gdPoint
 
struct  gdRect
 
struct  gdSink
 
struct  gdScatter
 

Macros

#define GD_MAJOR_VERSION   2 /*version605b5d1778*/
 
#define GD_MINOR_VERSION   3 /*version605b5d1778*/
 
#define GD_RELEASE_VERSION   1 /*version605b5d1778*/
 
#define GD_EXTRA_VERSION   "" /*version605b5d1778*/
 
#define GDXXX_VERSION_STR(mjr, mnr, rev, ext)   mjr "." mnr "." rev ext
 
#define GDXXX_STR(s)   GDXXX_SSTR(s) /* Two levels needed to expand args. */
 
#define GDXXX_SSTR(s)   #s
 
#define GD_VERSION_STRING
 
#define BGD_EXPORT_DATA_PROT
 
#define BGD_EXPORT_DATA_IMPL
 
#define BGD_STDCALL
 
#define BGD_DECLARE(rt)   BGD_EXPORT_DATA_PROT rt BGD_STDCALL
 
#define gdMaxColors   256
 
#define gdAlphaMax   127
 
#define gdAlphaOpaque   0
 
#define gdAlphaTransparent   127
 
#define gdRedMax   255
 
#define gdGreenMax   255
 
#define gdBlueMax   255
 
#define gdTrueColorGetAlpha(c)   (((c) & 0x7F000000) >> 24)
 
#define gdTrueColorGetRed(c)   (((c) & 0xFF0000) >> 16)
 
#define gdTrueColorGetGreen(c)   (((c) & 0x00FF00) >> 8)
 
#define gdTrueColorGetBlue(c)   ((c) & 0x0000FF)
 
#define gdEffectReplace   0
 
#define gdEffectAlphaBlend   1
 
#define gdEffectNormal   2
 
#define gdEffectOverlay   3
 
#define gdEffectMultiply   4
 
#define GD_TRUE   1
 
#define GD_FALSE   0
 
#define GD_EPSILON   1e-6
 
#define M_PI   3.14159265358979323846
 
#define gdDashSize   4
 
#define gdStyled   (-2)
 
#define gdBrushed   (-3)
 
#define gdStyledBrushed   (-4)
 
#define gdTiled   (-5)
 
#define gdTransparent   (-6)
 
#define gdAntiAliased   (-7)
 
#define gdImageCreatePalette   gdImageCreate
 
#define gdFTEX_LINESPACE   1
 
#define gdFTEX_CHARMAP   2
 
#define gdFTEX_RESOLUTION   4
 
#define gdFTEX_DISABLE_KERNING   8
 
#define gdFTEX_XSHOW   16
 
#define gdFTEX_FONTPATHNAME   32
 
#define gdFTEX_FONTCONFIG   64
 
#define gdFTEX_RETURNFONTPATHNAME   128
 
#define gdFTEX_Unicode   0
 
#define gdFTEX_Shift_JIS   1
 
#define gdFTEX_Big5   2
 
#define gdFTEX_Adobe_Custom   3
 
#define gdTrueColor(r, g, b)
 
#define gdTrueColorAlpha(r, g, b, a)
 
#define gdArc   0
 
#define gdPie   gdArc
 
#define gdChord   1
 
#define gdNoFill   2
 
#define gdEdged   4
 
#define gdImageTrueColor(im)   ((im)->trueColor)
 
#define gdImageSX(im)   ((im)->sx)
 
#define gdImageSY(im)   ((im)->sy)
 
#define gdImageColorsTotal(im)   ((im)->colorsTotal)
 
#define gdImageRed(im, c)
 
#define gdImageGreen(im, c)
 
#define gdImageBlue(im, c)
 
#define gdImageAlpha(im, c)
 
#define gdImageGetTransparent(im)   ((im)->transparent)
 
#define gdImageGetInterlaced(im)   ((im)->interlace)
 
#define gdImagePalettePixel(im, x, y)   (im)->pixels[(y)][(x)]
 
#define gdImageTrueColorPixel(im, x, y)   (im)->tpixels[(y)][(x)]
 
#define gdImageResolutionX(im)   (im)->res_x
 
#define gdImageResolutionY(im)   (im)->res_y
 
#define GD2_CHUNKSIZE   128
 
#define GD2_CHUNKSIZE_MIN   64
 
#define GD2_CHUNKSIZE_MAX   4096
 
#define GD2_VERS   2
 
#define GD2_ID   "gd2"
 
#define GD2_FMT_RAW   1
 
#define GD2_FMT_COMPRESSED   2
 
#define GD_FLIP_HORINZONTAL   1 /* typo, kept for BC */
 
#define GD_FLIP_HORIZONTAL   1
 
#define GD_FLIP_VERTICAL   2
 
#define GD_FLIP_BOTH   3
 
#define GD_CMP_IMAGE   1
 
#define GD_CMP_NUM_COLORS   2
 
#define GD_CMP_COLOR   4
 
#define GD_CMP_SIZE_X   8
 
#define GD_CMP_SIZE_Y   16
 
#define GD_CMP_TRANSPARENT   32
 
#define GD_CMP_BACKGROUND   64
 
#define GD_CMP_INTERLACE   128
 
#define GD_CMP_TRUECOLOR   256
 
#define GD_RESOLUTION   96 /* pixels per inch */
 

Typedefs

typedef double(* interpolation_method) (double)
 
typedef struct gdImageStruct gdImage
 
typedef gdImagegdImagePtr
 
typedef struct gdPointFgdPointFPtr
 
typedef gdFontgdFontPtr
 
typedef void(* gdErrorMethod) (int, const char *, va_list)
 
typedef struct gdSourcegdSourcePtr
 
typedef struct gdFTStringExtragdFTStringExtraPtr
 
typedef struct gdPointgdPointPtr
 
typedef struct gdRectgdRectPtr
 
typedef int(* gdCallbackImageColor) (gdImagePtr im, int src)
 
typedef struct gdSinkgdSinkPtr
 
typedef struct gdScattergdScatterPtr
 

Enumerations

enum  gdPaletteQuantizationMethod {
  GD_QUANT_DEFAULT = 0 , GD_QUANT_JQUANT = 1 , GD_QUANT_NEUQUANT = 2 , GD_QUANT_LIQ = 3 ,
  GD_QUANT_DEFAULT = 0 , GD_QUANT_JQUANT = 1 , GD_QUANT_NEUQUANT = 2 , GD_QUANT_LIQ = 3
}
 
enum  gdInterpolationMethod {
  GD_DEFAULT = 0 , GD_BELL , GD_BESSEL , GD_BILINEAR_FIXED ,
  GD_BICUBIC , GD_BICUBIC_FIXED , GD_BLACKMAN , GD_BOX ,
  GD_BSPLINE , GD_CATMULLROM , GD_GAUSSIAN , GD_GENERALIZED_CUBIC ,
  GD_HERMITE , GD_HAMMING , GD_HANNING , GD_MITCHELL ,
  GD_NEAREST_NEIGHBOUR , GD_POWER , GD_QUADRATIC , GD_SINC ,
  GD_TRIANGLE , GD_WEIGHTED4 , GD_LINEAR , GD_METHOD_COUNT = 23 ,
  GD_DEFAULT = 0 , GD_BELL , GD_BESSEL , GD_BILINEAR_FIXED ,
  GD_BICUBIC , GD_BICUBIC_FIXED , GD_BLACKMAN , GD_BOX ,
  GD_BSPLINE , GD_CATMULLROM , GD_GAUSSIAN , GD_GENERALIZED_CUBIC ,
  GD_HERMITE , GD_HAMMING , GD_HANNING , GD_MITCHELL ,
  GD_NEAREST_NEIGHBOUR , GD_POWER , GD_QUADRATIC , GD_SINC ,
  GD_TRIANGLE , GD_WEIGHTED4 , GD_LINEAR , GD_METHOD_COUNT = 23
}
 
enum  { gdDisposalUnknown , gdDisposalNone , gdDisposalRestoreBackground , gdDisposalRestorePrevious }
 
enum  gdPixelateMode { GD_PIXELATE_UPPERLEFT , GD_PIXELATE_AVERAGE , GD_PIXELATE_UPPERLEFT , GD_PIXELATE_AVERAGE }
 
enum  gdCropMode {
  GD_CROP_DEFAULT = 0 , GD_CROP_TRANSPARENT , GD_CROP_BLACK , GD_CROP_WHITE ,
  GD_CROP_SIDES , GD_CROP_THRESHOLD , GD_CROP_DEFAULT = 0 , GD_CROP_TRANSPARENT ,
  GD_CROP_BLACK , GD_CROP_WHITE , GD_CROP_SIDES , GD_CROP_THRESHOLD
}
 
enum  gdAffineStandardMatrix {
  GD_AFFINE_TRANSLATE = 0 , GD_AFFINE_SCALE , GD_AFFINE_ROTATE , GD_AFFINE_SHEAR_HORIZONTAL ,
  GD_AFFINE_SHEAR_VERTICAL , GD_AFFINE_TRANSLATE = 0 , GD_AFFINE_SCALE , GD_AFFINE_ROTATE ,
  GD_AFFINE_SHEAR_HORIZONTAL , GD_AFFINE_SHEAR_VERTICAL
}
 

Functions

int gdAlphaBlend (int dest, int src)
 
int gdLayerOverlay (int dest, int src)
 
int gdLayerMultiply (int dest, int src)
 
void gdSetErrorMethod (gdErrorMethod)
 
void gdClearErrorMethod (void)
 
gdImagePtr gdImageCreate (int sx, int sy)
 
gdImagePtr gdImageCreateTrueColor (int sx, int sy)
 
gdImagePtr gdImageCreateFromPng (FILE *fd)
 
gdImagePtr gdImageCreateFromPngCtx (gdIOCtxPtr in)
 
gdImagePtr gdImageCreateFromPngPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromGif (FILE *fd)
 
gdImagePtr gdImageCreateFromGifCtx (gdIOCtxPtr in)
 
gdImagePtr gdImageCreateFromGifPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromWBMP (FILE *inFile)
 
gdImagePtr gdImageCreateFromWBMPCtx (gdIOCtx *infile)
 
gdImagePtr gdImageCreateFromWBMPPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromJpeg (FILE *infile)
 
gdImagePtr gdImageCreateFromJpegEx (FILE *infile, int ignore_warning)
 
gdImagePtr gdImageCreateFromJpegCtx (gdIOCtx *infile)
 
gdImagePtr gdImageCreateFromJpegCtxEx (gdIOCtx *infile, int ignore_warning)
 
gdImagePtr gdImageCreateFromJpegPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning)
 
gdImagePtr gdImageCreateFromWebp (FILE *inFile)
 
gdImagePtr gdImageCreateFromWebpPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx *infile)
 
gdImagePtr gdImageCreateFromTiff (FILE *inFile)
 
gdImagePtr gdImageCreateFromTiffCtx (gdIOCtx *infile)
 
gdImagePtr gdImageCreateFromTiffPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromTga (FILE *fp)
 
gdImagePtr gdImageCreateFromTgaCtx (gdIOCtx *ctx)
 
gdImagePtr gdImageCreateFromTgaPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromBmp (FILE *inFile)
 
gdImagePtr gdImageCreateFromBmpPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromBmpCtx (gdIOCtxPtr infile)
 
gdImagePtr gdImageCreateFromFile (const char *filename)
 
gdImagePtr gdImageCreateFromPngSource (gdSourcePtr in)
 
gdImagePtr gdImageCreateFromGd (FILE *in)
 
gdImagePtr gdImageCreateFromGdCtx (gdIOCtxPtr in)
 
gdImagePtr gdImageCreateFromGdPtr (int size, void *data)
 
gdImagePtr gdImageCreateFromGd2 (FILE *in)
 
gdImagePtr gdImageCreateFromGd2Ctx (gdIOCtxPtr in)
 
gdImagePtr gdImageCreateFromGd2Ptr (int size, void *data)
 
gdImagePtr gdImageCreateFromGd2Part (FILE *in, int srcx, int srcy, int w, int h)
 
gdImagePtr gdImageCreateFromGd2PartCtx (gdIOCtxPtr in, int srcx, int srcy, int w, int h)
 
gdImagePtr gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, int h)
 
gdImagePtr gdImageCreateFromXbm (FILE *in)
 
void gdImageXbmCtx (gdImagePtr image, char *file_name, int fg, gdIOCtx *out)
 
gdImagePtr gdImageCreateFromXpm (char *filename)
 
void gdImageDestroy (gdImagePtr im)
 
void gdImageSetPixel (gdImagePtr im, int x, int y, int color)
 
int gdImageGetPixel (gdImagePtr im, int x, int y)
 
int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
 
void gdImageAABlend (gdImagePtr im)
 
void gdImageLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
void gdImageDashedLine (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
void gdImageRectangle (gdImagePtr im, int x1, int y1, int x2, int y2, int color)
 
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)
 
void gdImageSetResolution (gdImagePtr im, const unsigned int res_x, const unsigned int res_y)
 
int gdImageBoundsSafe (gdImagePtr im, int x, int y)
 
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, int color)
 
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, unsigned char *s, int color)
 
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, unsigned short *s, int color)
 
int gdFontCacheSetup (void)
 
void gdFontCacheShutdown (void)
 
void gdFreeFontCache (void)
 
char * gdImageStringTTF (gdImage *im, int *brect, int fg, const char *fontlist, double ptsize, double angle, int x, int y, const char *string)
 
char * gdImageStringFT (gdImage *im, int *brect, int fg, const char *fontlist, double ptsize, double angle, int x, int y, const char *string)
 
int gdFTUseFontConfig (int flag)
 
char * gdImageStringFTEx (gdImage *im, int *brect, int fg, const char *fontlist, double ptsize, double angle, int x, int y, const char *string, gdFTStringExtraPtr strex)
 
void gdImagePolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 
void gdImageOpenPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 
void gdImageFilledPolygon (gdImagePtr im, gdPointPtr p, int n, int c)
 
int gdImageColorAllocate (gdImagePtr im, int r, int g, int b)
 
int gdImageColorAllocateAlpha (gdImagePtr im, int r, int g, int b, int a)
 
int gdImageColorClosest (gdImagePtr im, int r, int g, int b)
 
int gdImageColorClosestAlpha (gdImagePtr im, int r, int g, int b, int a)
 
int gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
 
int gdImageColorExact (gdImagePtr im, int r, int g, int b)
 
int gdImageColorExactAlpha (gdImagePtr im, int r, int g, int b, int a)
 
int gdImageColorResolve (gdImagePtr im, int r, int g, int b)
 
int gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
 
void gdImageColorDeallocate (gdImagePtr im, int color)
 
gdImagePtr gdImageCreatePaletteFromTrueColor (gdImagePtr im, int ditherFlag, int colorsWanted)
 
int gdImageTrueColorToPalette (gdImagePtr im, int ditherFlag, int colorsWanted)
 
int gdImagePaletteToTrueColor (gdImagePtr src)
 
int gdImageColorMatch (gdImagePtr im1, gdImagePtr im2)
 
int gdImageTrueColorToPaletteSetMethod (gdImagePtr im, int method, int speed)
 
void gdImageTrueColorToPaletteSetQuality (gdImagePtr im, int min_quality, int max_quality)
 
void gdImageColorTransparent (gdImagePtr im, int color)
 
void gdImagePaletteCopy (gdImagePtr dst, gdImagePtr src)
 
int gdImageColorReplace (gdImagePtr im, int src, int dst)
 
int gdImageColorReplaceThreshold (gdImagePtr im, int src, int dst, float threshold)
 
int gdImageColorReplaceArray (gdImagePtr im, int len, int *src, int *dst)
 
int gdImageColorReplaceCallback (gdImagePtr im, gdCallbackImageColor callback)
 
void gdImageGif (gdImagePtr im, FILE *out)
 
void gdImagePng (gdImagePtr im, FILE *out)
 
void gdImagePngCtx (gdImagePtr im, gdIOCtx *out)
 
void gdImageGifCtx (gdImagePtr im, gdIOCtx *out)
 
void gdImageTiff (gdImagePtr im, FILE *outFile)
 
voidgdImageTiffPtr (gdImagePtr im, int *size)
 
void gdImageTiffCtx (gdImagePtr image, gdIOCtx *out)
 
voidgdImageBmpPtr (gdImagePtr im, int *size, int compression)
 
void gdImageBmp (gdImagePtr im, FILE *outFile, int compression)
 
void gdImageBmpCtx (gdImagePtr im, gdIOCtxPtr out, int compression)
 
void gdImagePngEx (gdImagePtr im, FILE *out, int level)
 
void gdImagePngCtxEx (gdImagePtr im, gdIOCtx *out, int level)
 
void gdImageWBMP (gdImagePtr image, int fg, FILE *out)
 
void gdImageWBMPCtx (gdImagePtr image, int fg, gdIOCtx *out)
 
int gdImageFile (gdImagePtr im, const char *filename)
 
int gdSupportsFileType (const char *filename, int writing)
 
void gdFree (void *m)
 
voidgdImageWBMPPtr (gdImagePtr im, int *size, int fg)
 
void gdImageJpeg (gdImagePtr im, FILE *out, int quality)
 
void gdImageJpegCtx (gdImagePtr im, gdIOCtx *out, int quality)
 
voidgdImageJpegPtr (gdImagePtr im, int *size, int quality)
 
void gdImageWebpEx (gdImagePtr im, FILE *outFile, int quantization)
 
void gdImageWebp (gdImagePtr im, FILE *outFile)
 
voidgdImageWebpPtr (gdImagePtr im, int *size)
 
voidgdImageWebpPtrEx (gdImagePtr im, int *size, int quantization)
 
void gdImageWebpCtx (gdImagePtr im, gdIOCtx *outfile, int quantization)
 
void gdImageGifAnimBegin (gdImagePtr im, FILE *outFile, int GlobalCM, int Loops)
 
void gdImageGifAnimAdd (gdImagePtr im, FILE *outFile, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)
 
void gdImageGifAnimEnd (FILE *outFile)
 
void gdImageGifAnimBeginCtx (gdImagePtr im, gdIOCtx *out, int GlobalCM, int Loops)
 
void gdImageGifAnimAddCtx (gdImagePtr im, gdIOCtx *out, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)
 
void gdImageGifAnimEndCtx (gdIOCtx *out)
 
voidgdImageGifAnimBeginPtr (gdImagePtr im, int *size, int GlobalCM, int Loops)
 
voidgdImageGifAnimAddPtr (gdImagePtr im, int *size, int LocalCM, int LeftOfs, int TopOfs, int Delay, int Disposal, gdImagePtr previm)
 
voidgdImageGifAnimEndPtr (int *size)
 
void gdImagePngToSink (gdImagePtr im, gdSinkPtr out)
 
void gdImageGd (gdImagePtr im, FILE *out)
 
void gdImageGd2 (gdImagePtr im, FILE *out, int cs, int fmt)
 
voidgdImageGifPtr (gdImagePtr im, int *size)
 
voidgdImagePngPtr (gdImagePtr im, int *size)
 
voidgdImagePngPtrEx (gdImagePtr im, int *size, int level)
 
voidgdImageGdPtr (gdImagePtr im, int *size)
 
voidgdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size)
 
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, int color)
 
void gdImageEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color)
 
void gdImageFilledEllipse (gdImagePtr im, int cx, int cy, int w, int h, int color)
 
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, int srcX, int srcY, int w, int h)
 
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, int dstY, int srcX, int srcY, int w, int h, int pct)
 
void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
 
void gdImageCopyResampled (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)
 
void gdImageCopyRotated (gdImagePtr dst, gdImagePtr src, double dstX, double dstY, int srcX, int srcY, int srcWidth, int srcHeight, int angle)
 
gdImagePtr gdImageClone (gdImagePtr src)
 
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)
 
void gdImageSetThickness (gdImagePtr im, int thickness)
 
void gdImageInterlace (gdImagePtr im, int interlaceArg)
 
void gdImageAlphaBlending (gdImagePtr im, int alphaBlendingArg)
 
void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
 
gdImagePtr gdImageNeuQuant (gdImagePtr im, const int max_color, int sample_factor)
 
int gdImagePixelate (gdImagePtr im, int block_size, const unsigned int mode)
 
int gdImageScatter (gdImagePtr im, int sub, int plus)
 
int gdImageScatterColor (gdImagePtr im, int sub, int plus, int colors[], unsigned int num_colors)
 
int gdImageScatterEx (gdImagePtr im, gdScatterPtr s)
 
int gdImageSmooth (gdImagePtr im, float weight)
 
int gdImageMeanRemoval (gdImagePtr im)
 
int gdImageEmboss (gdImagePtr im)
 
int gdImageGaussianBlur (gdImagePtr im)
 
int gdImageEdgeDetectQuick (gdImagePtr src)
 
int gdImageSelectiveBlur (gdImagePtr src)
 
int gdImageConvolution (gdImagePtr src, float filter[3][3], float filter_div, float offset)
 
int gdImageColor (gdImagePtr src, const int red, const int green, const int blue, const int alpha)
 
int gdImageContrast (gdImagePtr src, double contrast)
 
int gdImageBrightness (gdImagePtr src, int brightness)
 
int gdImageGrayScale (gdImagePtr src)
 
int gdImageNegate (gdImagePtr src)
 
gdImagePtr gdImageCopyGaussianBlurred (gdImagePtr src, int radius, double sigma)
 
gdIOCtxgdNewFileCtx (FILE *)
 
gdIOCtxgdNewDynamicCtx (int size, void *data)
 
gdIOCtxgdNewDynamicCtxEx (int size, void *data, int freeFlag)
 
gdIOCtxgdNewSSCtx (gdSourcePtr in, gdSinkPtr out)
 
voidgdDPExtractData (struct gdIOCtx *ctx, int *size)
 
int gdImageCompare (gdImagePtr im1, gdImagePtr im2)
 
void gdImageFlipHorizontal (gdImagePtr im)
 
void gdImageFlipVertical (gdImagePtr im)
 
void gdImageFlipBoth (gdImagePtr im)
 
gdImagePtr gdImageCrop (gdImagePtr src, const gdRect *crop)
 
gdImagePtr gdImageCropAuto (gdImagePtr im, const unsigned int mode)
 
gdImagePtr gdImageCropThreshold (gdImagePtr im, const unsigned int color, const float threshold)
 
int gdImageSetInterpolationMethod (gdImagePtr im, gdInterpolationMethod id)
 
gdInterpolationMethod gdImageGetInterpolationMethod (gdImagePtr im)
 
gdImagePtr gdImageScale (const gdImagePtr src, const unsigned int new_width, const unsigned int new_height)
 
gdImagePtr gdImageRotateInterpolated (const gdImagePtr src, const float angle, int bgcolor)
 
int gdAffineApplyToPointF (gdPointFPtr dst, const gdPointFPtr src, const double affine[6])
 
int gdAffineInvert (double dst[6], const double src[6])
 
int gdAffineFlip (double dst_affine[6], const double src_affine[6], const int flip_h, const int flip_v)
 
int gdAffineConcat (double dst[6], const double m1[6], const double m2[6])
 
int gdAffineIdentity (double dst[6])
 
int gdAffineScale (double dst[6], const double scale_x, const double scale_y)
 
int gdAffineRotate (double dst[6], const double angle)
 
int gdAffineShearHorizontal (double dst[6], const double angle)
 
int gdAffineShearVertical (double dst[6], const double angle)
 
int gdAffineTranslate (double dst[6], const double offset_x, const double offset_y)
 
double gdAffineExpansion (const double src[6])
 
int gdAffineRectilinear (const double src[6])
 
int gdAffineEqual (const double matrix1[6], const double matrix2[6])
 
int gdTransformAffineGetImage (gdImagePtr *dst, const gdImagePtr src, gdRectPtr src_area, const double affine[6])
 
int gdTransformAffineCopy (gdImagePtr dst, int dst_x, int dst_y, const gdImagePtr src, gdRectPtr src_region, const double affine[6])
 
int gdTransformAffineBoundingBox (gdRectPtr src, const double affine[6], gdRectPtr bbox)
 
int gdMajorVersion (void)
 
int gdMinorVersion (void)
 
int gdReleaseVersion (void)
 
const char * gdExtraVersion (void)
 
const char * gdVersionString (void)
 

Macro Definition Documentation

◆ BGD_DECLARE

#define BGD_DECLARE (   rt)    BGD_EXPORT_DATA_PROT rt BGD_STDCALL

Definition at line 79 of file gd.h.

◆ BGD_EXPORT_DATA_IMPL

#define BGD_EXPORT_DATA_IMPL

Definition at line 74 of file gd.h.

◆ BGD_EXPORT_DATA_PROT

#define BGD_EXPORT_DATA_PROT

Definition at line 73 of file gd.h.

◆ BGD_STDCALL

#define BGD_STDCALL

Definition at line 76 of file gd.h.

◆ GD2_CHUNKSIZE

#define GD2_CHUNKSIZE   128

Definition at line 1509 of file gd.h.

◆ GD2_CHUNKSIZE_MAX

#define GD2_CHUNKSIZE_MAX   4096

Definition at line 1511 of file gd.h.

◆ GD2_CHUNKSIZE_MIN

#define GD2_CHUNKSIZE_MIN   64

Definition at line 1510 of file gd.h.

◆ GD2_FMT_COMPRESSED

#define GD2_FMT_COMPRESSED   2

Definition at line 1517 of file gd.h.

◆ GD2_FMT_RAW

#define GD2_FMT_RAW   1

Definition at line 1516 of file gd.h.

◆ GD2_ID

#define GD2_ID   "gd2"

Definition at line 1514 of file gd.h.

◆ GD2_VERS

#define GD2_VERS   2

Definition at line 1513 of file gd.h.

◆ GD_CMP_BACKGROUND

#define GD_CMP_BACKGROUND   64

Definition at line 1618 of file gd.h.

◆ GD_CMP_COLOR

#define GD_CMP_COLOR   4

Definition at line 1614 of file gd.h.

◆ GD_CMP_IMAGE

#define GD_CMP_IMAGE   1

Group: Image Comparison

Constants: GD_CMP_IMAGE - Actual image IS different GD_CMP_NUM_COLORS - Number of colors in pallette differ GD_CMP_COLOR - Image colors differ GD_CMP_SIZE_X - Image width differs GD_CMP_SIZE_Y - Image heights differ GD_CMP_TRANSPARENT - Transparent color differs GD_CMP_BACKGROUND - Background color differs GD_CMP_INTERLACE - Interlaced setting differs GD_CMP_TRUECOLOR - Truecolor vs palette differs

See also:

  • <gdImageCompare>

Definition at line 1612 of file gd.h.

◆ GD_CMP_INTERLACE

#define GD_CMP_INTERLACE   128

Definition at line 1619 of file gd.h.

◆ GD_CMP_NUM_COLORS

#define GD_CMP_NUM_COLORS   2

Definition at line 1613 of file gd.h.

◆ GD_CMP_SIZE_X

#define GD_CMP_SIZE_X   8

Definition at line 1615 of file gd.h.

◆ GD_CMP_SIZE_Y

#define GD_CMP_SIZE_Y   16

Definition at line 1616 of file gd.h.

◆ GD_CMP_TRANSPARENT

#define GD_CMP_TRANSPARENT   32

Definition at line 1617 of file gd.h.

◆ GD_CMP_TRUECOLOR

#define GD_CMP_TRUECOLOR   256

Definition at line 1620 of file gd.h.

◆ GD_EPSILON

#define GD_EPSILON   1e-6

Definition at line 234 of file gd.h.

◆ GD_EXTRA_VERSION

#define GD_EXTRA_VERSION   "" /*version605b5d1778*/

Definition at line 17 of file gd.h.

◆ GD_FALSE

#define GD_FALSE   0

Definition at line 232 of file gd.h.

◆ GD_FLIP_BOTH

#define GD_FLIP_BOTH   3

Definition at line 1529 of file gd.h.

◆ GD_FLIP_HORINZONTAL

#define GD_FLIP_HORINZONTAL   1 /* typo, kept for BC */

Definition at line 1526 of file gd.h.

◆ GD_FLIP_HORIZONTAL

#define GD_FLIP_HORIZONTAL   1

Definition at line 1527 of file gd.h.

◆ GD_FLIP_VERTICAL

#define GD_FLIP_VERTICAL   2

Definition at line 1528 of file gd.h.

◆ GD_MAJOR_VERSION

#define GD_MAJOR_VERSION   2 /*version605b5d1778*/

Definition at line 14 of file gd.h.

◆ GD_MINOR_VERSION

#define GD_MINOR_VERSION   3 /*version605b5d1778*/

Definition at line 15 of file gd.h.

◆ GD_RELEASE_VERSION

#define GD_RELEASE_VERSION   1 /*version605b5d1778*/

Definition at line 16 of file gd.h.

◆ GD_RESOLUTION

#define GD_RESOLUTION   96 /* pixels per inch */

Definition at line 1623 of file gd.h.

◆ GD_TRUE

#define GD_TRUE   1

Definition at line 231 of file gd.h.

◆ GD_VERSION_STRING

#define GD_VERSION_STRING
Value:
#define GD_MAJOR_VERSION
Definition: gd.h:14
#define GD_MINOR_VERSION
Definition: gd.h:15
#define GD_RELEASE_VERSION
Definition: gd.h:16
#define GD_EXTRA_VERSION
Definition: gd.h:17
#define GDXXX_VERSION_STR(mjr, mnr, rev, ext)
Definition: gd.h:22
#define GDXXX_STR(s)
Definition: gd.h:23

Definition at line 26 of file gd.h.

◆ gdAlphaMax

#define gdAlphaMax   127

Definition at line 140 of file gd.h.

◆ gdAlphaOpaque

#define gdAlphaOpaque   0

Definition at line 141 of file gd.h.

◆ gdAlphaTransparent

#define gdAlphaTransparent   127

Definition at line 142 of file gd.h.

◆ gdAntiAliased

#define gdAntiAliased   (-7)

Definition at line 591 of file gd.h.

◆ gdArc

#define gdArc   0

Definition at line 1186 of file gd.h.

◆ gdBlueMax

#define gdBlueMax   255

Definition at line 145 of file gd.h.

◆ gdBrushed

#define gdBrushed   (-3)

Definition at line 587 of file gd.h.

◆ gdChord

#define gdChord   1

Definition at line 1188 of file gd.h.

◆ gdDashSize

#define gdDashSize   4

Definition at line 556 of file gd.h.

◆ gdEdged

#define gdEdged   4

Definition at line 1190 of file gd.h.

◆ gdEffectAlphaBlend

#define gdEffectAlphaBlend   1

Definition at line 226 of file gd.h.

◆ gdEffectMultiply

#define gdEffectMultiply   4

Definition at line 229 of file gd.h.

◆ gdEffectNormal

#define gdEffectNormal   2

Definition at line 227 of file gd.h.

◆ gdEffectOverlay

#define gdEffectOverlay   3

Definition at line 228 of file gd.h.

◆ gdEffectReplace

#define gdEffectReplace   0

Group: Effects

The layering effect

When pixels are drawn the new colors are "mixed" with the background depending on the effect.

Note that the effect does not apply to palette images, where pixels are always replaced.

Modes: gdEffectReplace - replace pixels gdEffectAlphaBlend - blend pixels, see <gdAlphaBlend> gdEffectNormal - default mode; same as gdEffectAlphaBlend gdEffectOverlay - overlay pixels, see <gdLayerOverlay> gdEffectMultiply - overlay pixels with multiply effect, see <gdLayerMultiply>

See also:

  • <gdImageAlphaBlending>

Definition at line 225 of file gd.h.

◆ gdFTEX_Adobe_Custom

#define gdFTEX_Adobe_Custom   3

Definition at line 853 of file gd.h.

◆ gdFTEX_Big5

#define gdFTEX_Big5   2

Definition at line 852 of file gd.h.

◆ gdFTEX_CHARMAP

#define gdFTEX_CHARMAP   2

Definition at line 824 of file gd.h.

◆ gdFTEX_DISABLE_KERNING

#define gdFTEX_DISABLE_KERNING   8

Definition at line 826 of file gd.h.

◆ gdFTEX_FONTCONFIG

#define gdFTEX_FONTCONFIG   64

Definition at line 835 of file gd.h.

◆ gdFTEX_FONTPATHNAME

#define gdFTEX_FONTPATHNAME   32

Definition at line 831 of file gd.h.

◆ gdFTEX_LINESPACE

#define gdFTEX_LINESPACE   1

Definition at line 823 of file gd.h.

◆ gdFTEX_RESOLUTION

#define gdFTEX_RESOLUTION   4

Definition at line 825 of file gd.h.

◆ gdFTEX_RETURNFONTPATHNAME

#define gdFTEX_RETURNFONTPATHNAME   128

Definition at line 840 of file gd.h.

◆ gdFTEX_Shift_JIS

#define gdFTEX_Shift_JIS   1

Definition at line 851 of file gd.h.

◆ gdFTEX_Unicode

#define gdFTEX_Unicode   0

Definition at line 850 of file gd.h.

◆ gdFTEX_XSHOW

#define gdFTEX_XSHOW   16

Definition at line 827 of file gd.h.

◆ gdGreenMax

#define gdGreenMax   255

Definition at line 144 of file gd.h.

◆ gdImageAlpha

#define gdImageAlpha (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetAlpha(c) : \
(im)->alpha[(c)])
#define c(n)
Definition: gpos-common.c:150
#define gdTrueColorGetAlpha(c)
Definition: gd.h:162
static enum alpha_handling alpha
Definition: pngtopnm.c:70

Macro: gdImageAlpha

Gets the alpha component value of a given color.

Parameters: im - The image. c - The color.

Definition at line 1389 of file gd.h.

◆ gdImageBlue

#define gdImageBlue (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetBlue(c) : \
(im)->blue[(c)])
#define blue
Definition: backend_eps.c:37
#define gdTrueColorGetBlue(c)
Definition: gd.h:201

Macro: gdImageBlue

Gets the blue component value of a given color.

Parameters: im - The image. c - The color.

Definition at line 1377 of file gd.h.

◆ gdImageColorsTotal

#define gdImageColorsTotal (   im)    ((im)->colorsTotal)

Macro: gdImageColorsTotal

Gets the number of colors in the palette.

This macro is only valid for palette images.

Parameters: im - The image

Definition at line 1342 of file gd.h.

◆ gdImageCreatePalette

#define gdImageCreatePalette   gdImageCreate

Definition at line 599 of file gd.h.

◆ gdImageGetInterlaced

#define gdImageGetInterlaced (   im)    ((im)->interlace)

Macro: gdImageGetInterlaced

Whether an image is interlaced.

Parameters: im - The image.

Returns: Non-zero for interlaced images, zero otherwise.

See also:

  • <gdImageInterlace>

Definition at line 1419 of file gd.h.

◆ gdImageGetTransparent

#define gdImageGetTransparent (   im)    ((im)->transparent)

Macro: gdImageGetTransparent

Gets the transparent color of the image.

Parameters: im - The image.

See also:

  • <gdImageColorTransparent>

Definition at line 1403 of file gd.h.

◆ gdImageGreen

#define gdImageGreen (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetGreen(c) : \
(im)->green[(c)])
#define green
Definition: backend_eps.c:36
#define gdTrueColorGetGreen(c)
Definition: gd.h:188

Macro: gdImageGreen

Gets the green component value of a given color.

Parameters: im - The image. c - The color.

Definition at line 1365 of file gd.h.

◆ gdImagePalettePixel

#define gdImagePalettePixel (   im,
  x,
  y 
)    (im)->pixels[(y)][(x)]

Macro: gdImagePalettePixel

Gets the color of a pixel.

Calling this macro is only valid for palette images. No bounds checking is done for the coordinates.

Parameters: im - The image. x - The x-coordinate. y - The y-coordinate.

See also:

  • <gdImageTrueColorPixel>
  • <gdImageGetPixel>

Definition at line 1438 of file gd.h.

◆ gdImageRed

#define gdImageRed (   im,
  c 
)
Value:
((im)->trueColor ? gdTrueColorGetRed(c) : \
(im)->red[(c)])
#define red
Definition: backend_eps.c:35
#define gdTrueColorGetRed(c)
Definition: gd.h:175

Macro: gdImageRed

Gets the red component value of a given color.

Parameters: im - The image. c - The color.

Definition at line 1353 of file gd.h.

◆ gdImageResolutionX

#define gdImageResolutionX (   im)    (im)->res_x

Macro: gdImageResolutionX

Gets the horizontal resolution in DPI.

Parameters: im - The image.

See also:

  • <gdImageResolutionY>
  • <gdImageSetResolution>

Definition at line 1471 of file gd.h.

◆ gdImageResolutionY

#define gdImageResolutionY (   im)    (im)->res_y

Macro: gdImageResolutionY

Gets the vertical resolution in DPI.

Parameters: im - The image.

See also:

  • <gdImageResolutionX>
  • <gdImageSetResolution>

Definition at line 1485 of file gd.h.

◆ gdImageSX

#define gdImageSX (   im)    ((im)->sx)

Macro: gdImageSX

Gets the width (in pixels) of an image.

Parameters: im - The image.

Definition at line 1320 of file gd.h.

◆ gdImageSY

#define gdImageSY (   im)    ((im)->sy)

Macro: gdImageSY

Gets the height (in pixels) of an image.

Parameters: im - The image.

Definition at line 1330 of file gd.h.

◆ gdImageTrueColor

#define gdImageTrueColor (   im)    ((im)->trueColor)

Group: Accessor Macros Macro: gdImageTrueColor

Whether an image is a truecolor image.

Parameters: im - The image.

Returns: Non-zero if the image is a truecolor image, zero for palette images.

Definition at line 1310 of file gd.h.

◆ gdImageTrueColorPixel

#define gdImageTrueColorPixel (   im,
  x,
  y 
)    (im)->tpixels[(y)][(x)]

Macro: gdImageTrueColorPixel

Gets the color of a pixel.

Calling this macro is only valid for truecolor images. No bounds checking is done for the coordinates.

Parameters: im - The image. x - The x-coordinate. y - The y-coordinate.

See also:

  • <gdImagePalettePixel>
  • <gdImageGetTrueColorPixel>

Definition at line 1457 of file gd.h.

◆ gdMaxColors

#define gdMaxColors   256

Definition at line 117 of file gd.h.

◆ gdNoFill

#define gdNoFill   2

Definition at line 1189 of file gd.h.

◆ gdPie

#define gdPie   gdArc

Definition at line 1187 of file gd.h.

◆ gdRedMax

#define gdRedMax   255

Definition at line 143 of file gd.h.

◆ gdStyled

#define gdStyled   (-2)

Group: Colors

Colors are always of type int which is supposed to be at least 32 bit large.

Kinds of colors: true colors - ARGB values where the alpha channel is stored as most significant, and the blue channel as least significant byte. Note that the alpha channel only uses the 7 least significant bits. Don't rely on the internal representation, though, and use <gdTrueColorAlpha> to compose a truecolor value, and <gdTrueColorGetAlpha>, <gdTrueColorGetRed>, <gdTrueColorGetGreen> and <gdTrueColorGetBlue> to access the respective channels. palette indexes - The index of a color palette entry (0-255). special colors - As listed in the following section.

Constants: Special Colors gdStyled - use the current style, see <gdImageSetStyle> gdBrushed - use the current brush, see <gdImageSetBrush> gdStyledBrushed - use the current style and brush gdTiled - use the current tile, see <gdImageSetTile> gdTransparent - indicate transparency, what is not the same as the transparent color index; used for lines only gdAntiAliased - draw anti aliased

Definition at line 586 of file gd.h.

◆ gdStyledBrushed

#define gdStyledBrushed   (-4)

Definition at line 588 of file gd.h.

◆ gdTiled

#define gdTiled   (-5)

Definition at line 589 of file gd.h.

◆ gdTransparent

#define gdTransparent   (-6)

Definition at line 590 of file gd.h.

◆ gdTrueColor

#define gdTrueColor (   r,
  g,
  b 
)
Value:
(((r) << 16) + \
((g) << 8) + \
(b))
#define b
Definition: jpegint.h:372
int g
Definition: ppmqvga.c:68
int r
Definition: ppmqvga.c:68

Definition at line 933 of file gd.h.

◆ gdTrueColorAlpha

#define gdTrueColorAlpha (   r,
  g,
  b,
  a 
)
Value:
(((a) << 24) + \
((r) << 16) + \
((g) << 8) + \
(b))
#define a(n)
Definition: gpos-common.c:148

Group: Color Composition

Macro: gdTrueColorAlpha

Compose a truecolor value from its components

Parameters: r - The red channel (0-255) g - The green channel (0-255) b - The blue channel (0-255) a - The alpha channel (0-127, where 127 is fully transparent, and 0 is completely opaque).

See also:

  • <gdTrueColorGetAlpha>
  • <gdTrueColorGetRed>
  • <gdTrueColorGetGreen>
  • <gdTrueColorGetBlue>
  • <gdImageColorExactAlpha>

Definition at line 958 of file gd.h.

◆ gdTrueColorGetAlpha

#define gdTrueColorGetAlpha (   c)    (((c) & 0x7F000000) >> 24)

Group: Color Decomposition Macro: gdTrueColorGetAlpha

Gets the alpha channel value

Parameters: c - The color

See also:

  • <gdTrueColorAlpha>

Definition at line 162 of file gd.h.

◆ gdTrueColorGetBlue

#define gdTrueColorGetBlue (   c)    ((c) & 0x0000FF)

Macro: gdTrueColorGetBlue

Gets the blue channel value

Parameters: c - The color

See also:

  • <gdTrueColorAlpha>

Definition at line 201 of file gd.h.

◆ gdTrueColorGetGreen

#define gdTrueColorGetGreen (   c)    (((c) & 0x00FF00) >> 8)

Macro: gdTrueColorGetGreen

Gets the green channel value

Parameters: c - The color

See also:

  • <gdTrueColorAlpha>

Definition at line 188 of file gd.h.

◆ gdTrueColorGetRed

#define gdTrueColorGetRed (   c)    (((c) & 0xFF0000) >> 16)

Macro: gdTrueColorGetRed

Gets the red channel value

Parameters: c - The color

See also:

  • <gdTrueColorAlpha>

Definition at line 175 of file gd.h.

◆ GDXXX_SSTR

#define GDXXX_SSTR (   s)    #s

Definition at line 24 of file gd.h.

◆ GDXXX_STR

#define GDXXX_STR (   s)    GDXXX_SSTR(s) /* Two levels needed to expand args. */

Definition at line 23 of file gd.h.

◆ GDXXX_VERSION_STR

#define GDXXX_VERSION_STR (   mjr,
  mnr,
  rev,
  ext 
)    mjr "." mnr "." rev ext

Definition at line 22 of file gd.h.

◆ M_PI

#define M_PI   3.14159265358979323846

Definition at line 236 of file gd.h.

Typedef Documentation

◆ gdCallbackImageColor

typedef int(* gdCallbackImageColor) (gdImagePtr im, int src)

Definition at line 1033 of file gd.h.

◆ gdErrorMethod

typedef void(* gdErrorMethod) (int, const char *, va_list)

Definition at line 548 of file gd.h.

◆ gdFontPtr

typedef gdFont* gdFontPtr

Definition at line 546 of file gd.h.

◆ gdFTStringExtraPtr

◆ gdImage

typedef struct gdImageStruct gdImage

◆ gdImagePtr

typedef gdImage* gdImagePtr

Definition at line 463 of file gd.h.

◆ gdPointFPtr

typedef struct gdPointF * gdPointFPtr

◆ gdPointPtr

typedef struct gdPoint * gdPointPtr

◆ gdRectPtr

typedef struct gdRect * gdRectPtr

◆ gdScatterPtr

typedef struct gdScatter * gdScatterPtr

◆ gdSinkPtr

typedef struct gdSink * gdSinkPtr

◆ gdSourcePtr

typedef struct gdSource * gdSourcePtr

◆ interpolation_method

typedef double(* interpolation_method) (double)

Definition at line 339 of file gd.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Group: GifAnim

Legal values for Disposal. gdDisposalNone is always used by the built-in optimizer if previm is passed.

Constants: gdImageGifAnim

gdDisposalUnknown - Not recommended gdDisposalNone - Preserve previous frame gdDisposalRestoreBackground - First allocated color of palette gdDisposalRestorePrevious - Restore to before start of frame

See also:

  • <gdImageGifAnimAdd>
Enumerator
gdDisposalUnknown 
gdDisposalNone 
gdDisposalRestoreBackground 
gdDisposalRestorePrevious 

Definition at line 1104 of file gd.h.

◆ gdAffineStandardMatrix

Enumerator
GD_AFFINE_TRANSLATE 
GD_AFFINE_SCALE 
GD_AFFINE_ROTATE 
GD_AFFINE_SHEAR_HORIZONTAL 
GD_AFFINE_SHEAR_VERTICAL 
GD_AFFINE_TRANSLATE 
GD_AFFINE_SCALE 
GD_AFFINE_ROTATE 
GD_AFFINE_SHEAR_HORIZONTAL 
GD_AFFINE_SHEAR_VERTICAL 

Definition at line 1564 of file gd.h.

◆ gdCropMode

enum gdCropMode

Group: Crop

Constants: gdCropMode GD_CROP_DEFAULT - Same as GD_CROP_TRANSPARENT GD_CROP_TRANSPARENT - Crop using the transparent color GD_CROP_BLACK - Crop black borders GD_CROP_WHITE - Crop white borders GD_CROP_SIDES - Crop using colors of the 4 corners

See also:

  • <gdImageCropAuto>
Enumerator
GD_CROP_DEFAULT 
GD_CROP_TRANSPARENT 
GD_CROP_BLACK 
GD_CROP_WHITE 
GD_CROP_SIDES 
GD_CROP_THRESHOLD 
GD_CROP_DEFAULT 
GD_CROP_TRANSPARENT 
GD_CROP_BLACK 
GD_CROP_WHITE 
GD_CROP_SIDES 
GD_CROP_THRESHOLD 

Definition at line 1544 of file gd.h.

◆ gdInterpolationMethod

Group: Transform

Constants: gdInterpolationMethod

GD_BELL - Bell GD_BESSEL - Bessel GD_BILINEAR_FIXED - fixed point bilinear GD_BICUBIC - Bicubic GD_BICUBIC_FIXED - fixed point bicubic integer GD_BLACKMAN - Blackman GD_BOX - Box GD_BSPLINE - BSpline GD_CATMULLROM - Catmullrom GD_GAUSSIAN - Gaussian GD_GENERALIZED_CUBIC - Generalized cubic GD_HERMITE - Hermite GD_HAMMING - Hamming GD_HANNING - Hannig GD_MITCHELL - Mitchell GD_NEAREST_NEIGHBOUR - Nearest neighbour interpolation GD_POWER - Power GD_QUADRATIC - Quadratic GD_SINC - Sinc GD_TRIANGLE - Triangle GD_WEIGHTED4 - 4 pixels weighted bilinear interpolation GD_LINEAR - bilinear interpolation

See also:

  • <gdImageSetInterpolationMethod>
  • <gdImageGetInterpolationMethod>
Enumerator
GD_DEFAULT 
GD_BELL 
GD_BESSEL 
GD_BILINEAR_FIXED 
GD_BICUBIC 
GD_BICUBIC_FIXED 
GD_BLACKMAN 
GD_BOX 
GD_BSPLINE 
GD_CATMULLROM 
GD_GAUSSIAN 
GD_GENERALIZED_CUBIC 
GD_HERMITE 
GD_HAMMING 
GD_HANNING 
GD_MITCHELL 
GD_NEAREST_NEIGHBOUR 
GD_POWER 
GD_QUADRATIC 
GD_SINC 
GD_TRIANGLE 
GD_WEIGHTED4 
GD_LINEAR 
GD_METHOD_COUNT 
GD_DEFAULT 
GD_BELL 
GD_BESSEL 
GD_BILINEAR_FIXED 
GD_BICUBIC 
GD_BICUBIC_FIXED 
GD_BLACKMAN 
GD_BOX 
GD_BSPLINE 
GD_CATMULLROM 
GD_GAUSSIAN 
GD_GENERALIZED_CUBIC 
GD_HERMITE 
GD_HAMMING 
GD_HANNING 
GD_MITCHELL 
GD_NEAREST_NEIGHBOUR 
GD_POWER 
GD_QUADRATIC 
GD_SINC 
GD_TRIANGLE 
GD_WEIGHTED4 
GD_LINEAR 
GD_METHOD_COUNT 

Definition at line 309 of file gd.h.

◆ gdPaletteQuantizationMethod

Group: Color Quantization

Enum: gdPaletteQuantizationMethod

Constants: GD_QUANT_DEFAULT - GD_QUANT_LIQ if libimagequant is available, GD_QUANT_JQUANT otherwise. GD_QUANT_JQUANT - libjpeg's old median cut. Fast, but only uses 16-bit color. GD_QUANT_NEUQUANT - NeuQuant - approximation using Kohonen neural network. GD_QUANT_LIQ - A combination of algorithms used in libimagequant aiming for the highest quality at cost of speed.

Note that GD_QUANT_JQUANT does not retain the alpha channel, and GD_QUANT_NEUQUANT does not support dithering.

See also:

  • <gdImageTrueColorToPaletteSetMethod>
Enumerator
GD_QUANT_DEFAULT 
GD_QUANT_JQUANT 
GD_QUANT_NEUQUANT 
GD_QUANT_LIQ 
GD_QUANT_DEFAULT 
GD_QUANT_JQUANT 
GD_QUANT_NEUQUANT 
GD_QUANT_LIQ 

Definition at line 269 of file gd.h.

◆ gdPixelateMode

Enumerator
GD_PIXELATE_UPPERLEFT 
GD_PIXELATE_AVERAGE 
GD_PIXELATE_UPPERLEFT 
GD_PIXELATE_AVERAGE 

Definition at line 1260 of file gd.h.

Function Documentation

◆ gdAffineApplyToPointF()

int gdAffineApplyToPointF ( gdPointFPtr  dst,
const gdPointFPtr  src,
const double  affine[6] 
)

Title: Matrix Group: Affine Matrix Function: gdAffineApplyToPointF Applies an affine transformation to a point (floating point gdPointF)

Parameters: dst - Where to store the resulting point affine - Source Point flip_horz - affine matrix

Returns: GD_TRUE if the affine is rectilinear or GD_FALSE

Definition at line 31 of file gd_matrix.c.

References link_confs::dst, GD_TRUE, link_confs::src, cordic::x, and y.

Referenced by gdTransformAffineBoundingBox(), and gdTransformAffineCopy().

◆ gdAffineConcat()

int gdAffineConcat ( double  dst[6],
const double  m1[6],
const double  m2[6] 
)

Function: gdAffineConcat Concat (Multiply) two affine transformation matrices.

Concats two affine transforms together, i.e. the result will be the equivalent of doing first the transformation m1 and then m2. All parameters can be the same matrix (safe to call using the same array for all three arguments).

Parameters: dst - Where to store the resulting affine transform m1 - First affine matrix m2 - Second affine matrix

Returns: GD_TRUE on success or GD_FALSE

Definition at line 125 of file gd_matrix.c.

References link_confs::dst, and GD_TRUE.

Referenced by gdTransformAffineGetImage().

◆ gdAffineEqual()

int gdAffineEqual ( const double  m1[6],
const double  m2[6] 
)

Function: gdAffineEqual Determines whether two affine transformations are equal. A tolerance has been implemented using GD_EPSILON.

Parameters: m1 - The first affine transformation m2 - The first affine transformation

Returns: GD_TRUE on success or GD_FALSE

Definition at line 327 of file gd_matrix.c.

References fabs, and GD_EPSILON.

◆ gdAffineExpansion()

double gdAffineExpansion ( const double  src[6])

gdAffineexpansion: Find the affine's expansion factor. @src: The affine transformation.

Finds the expansion factor, i.e. the square root of the factor by which the affine transform affects area. In an affine transform composed of scaling, rotation, shearing, and translation, returns the amount of scaling.

GD_TRUE on success or GD_FALSE

Definition at line 293 of file gd_matrix.c.

References fabs, sqrt(), and link_confs::src.

◆ gdAffineFlip()

int gdAffineFlip ( double  dst[6],
const double  src[6],
const int  flip_h,
const int  flip_v 
)

Function: gdAffineFlip Flip an affine transformation horizontally or vertically.

Flips the affine transform, giving GD_FALSE for <flip_horz> and <flip_vert> will clone the affine matrix. GD_TRUE for both will copy a 180° rotation.

Parameters: dst - Where to store the resulting affine transform src_affine - Original affine matrix flip_h - Whether or not to flip horizontally flip_v - Whether or not to flip vertically

Returns: GD_TRUE on success or GD_FALSE

Definition at line 97 of file gd_matrix.c.

References link_confs::dst, GD_TRUE, and link_confs::src.

◆ gdAffineIdentity()

int gdAffineIdentity ( double  dst[6])

Function: gdAffineIdentity Set up the identity matrix.

Parameters: dst - Where to store the resulting affine transform

Returns: GD_TRUE on success or GD_FALSE

Definition at line 154 of file gd_matrix.c.

References link_confs::dst, and GD_TRUE.

◆ gdAffineInvert()

int gdAffineInvert ( double  dst[6],
const double  src[6] 
)

Function: gdAffineInvert Find the inverse of an affine transformation.

All non-degenerate affine transforms are invertible. Applying the inverted matrix will restore the original values. Multiplying <src> by <dst> (commutative) will return the identity affine (rounding error possible).

Parameters: dst - Where to store the resulting affine transform src_affine - Original affine matrix flip_horz - Whether or not to flip horizontally flip_vert - Whether or not to flip vertically

See also: <gdAffineIdentity>

Returns: GD_TRUE on success or GD_FALSE on failure

Definition at line 62 of file gd_matrix.c.

References link_confs::dst, fabs, GD_FALSE, GD_TRUE, and link_confs::src.

Referenced by gdTransformAffineCopy().

◆ gdAffineRectilinear()

int gdAffineRectilinear ( const double  m[6])

Function: gdAffineRectilinear Determines whether the affine transformation is axis aligned. A tolerance has been implemented using GD_EPSILON.

Parameters: m - The affine transformation

Returns: GD_TRUE if the affine is rectilinear or GD_FALSE

Definition at line 309 of file gd_matrix.c.

References fabs, GD_EPSILON, and m.

◆ gdAffineRotate()

int gdAffineRotate ( double  dst[6],
const double  angle 
)

Function: gdAffineRotate Set up a rotation affine transform.

Like the other angle in libGD, in which increasing y moves downward, this is a counterclockwise rotation.

Parameters: dst - Where to store the resulting affine transform angle - Rotation angle in degrees

Returns: GD_TRUE on success or GD_FALSE

Definition at line 201 of file gd_matrix.c.

References cordic::angle, cos(), link_confs::dst, GD_TRUE, M_PI, and sin().

Referenced by gdRotatedImageSize().

◆ gdAffineScale()

int gdAffineScale ( double  dst[6],
const double  scale_x,
const double  scale_y 
)

Function: gdAffineScale Set up a scaling matrix.

Parameters: scale_x - X scale factor scale_y - Y scale factor

Returns: GD_TRUE on success or GD_FALSE

Definition at line 176 of file gd_matrix.c.

References link_confs::dst, and GD_TRUE.

◆ gdAffineShearHorizontal()

int gdAffineShearHorizontal ( double  dst[6],
const double  angle 
)

Function: gdAffineShearHorizontal Set up a horizontal shearing matrix || becomes \.

Parameters: dst - Where to store the resulting affine transform angle - Shear angle in degrees

Returns: GD_TRUE on success or GD_FALSE

Definition at line 226 of file gd_matrix.c.

References cordic::angle, link_confs::dst, GD_TRUE, M_PI, and tan().

◆ gdAffineShearVertical()

int gdAffineShearVertical ( double  dst[6],
const double  angle 
)

Function: gdAffineShearVertical Set up a vertical shearing matrix, columns are untouched.

Parameters: dst - Where to store the resulting affine transform angle - Shear angle in degrees

Returns: GD_TRUE on success or GD_FALSE

Definition at line 248 of file gd_matrix.c.

References cordic::angle, link_confs::dst, GD_TRUE, M_PI, and tan().

◆ gdAffineTranslate()

int gdAffineTranslate ( double  dst[6],
const double  offset_x,
const double  offset_y 
)

Function: gdAffineTranslate Set up a translation matrix.

Parameters: dst - Where to store the resulting affine transform offset_x - Horizontal translation amount offset_y - Vertical translation amount

Returns: GD_TRUE on success or GD_FALSE

Definition at line 271 of file gd_matrix.c.

References link_confs::dst, GD_TRUE, offset_x, and offset_y.

Referenced by gdTransformAffineGetImage().

◆ gdAlphaBlend()

int gdAlphaBlend ( int  dst,
int  src 
)

Function: gdAlphaBlend

Blend two colors

Parameters: dst - The color to blend onto. src - The color to blend.

See also:

  • <gdImageAlphaBlending>
  • <gdLayerOverlay>
  • <gdLayerMultiply>

Definition at line 4066 of file gd.c.

◆ gdClearErrorMethod()

void gdClearErrorMethod ( void  )

Definition at line 136 of file gd.c.

◆ gdDPExtractData()

void* gdDPExtractData ( struct gdIOCtx ctx,
int size 
)

◆ gdExtraVersion()

const char* gdExtraVersion ( void  )

Definition at line 39 of file gd_version.c.

References GD_EXTRA_VERSION.

◆ gdFontCacheSetup()

int gdFontCacheSetup ( void  )

◆ gdFontCacheShutdown()

void gdFontCacheShutdown ( void  )

◆ gdFree()

◆ gdFreeFontCache()

void gdFreeFontCache ( void  )

◆ gdFTUseFontConfig()

int gdFTUseFontConfig ( int  flag)

Function: gdFTUseFontConfig

Enable or disable fontconfig by default.

If GD is built without libfontconfig support, this function is a NOP.

Parameters: flag - Zero to disable, nonzero to enable.

See also:

  • <gdImageStringFTEx>

Definition at line 1922 of file gdft.c.

References flag, and void.

Referenced by main().

◆ gdImageAABlend()

void gdImageAABlend ( gdImagePtr  im)

Group: Primitives

Definition at line 1491 of file gd.c.

◆ gdImageAlphaBlending()

void gdImageAlphaBlending ( gdImagePtr  im,
int  alphaBlendingArg 
)

Function: gdImageAlphaBlending

Set the effect for subsequent drawing operations

Note that the effect is used for truecolor images only.

Parameters: im - The image. alphaBlendingArg - The effect.

See also:

  • <Effects>

Definition at line 4202 of file gd.c.

◆ gdImageArc()

void gdImageArc ( gdImagePtr  im,
int  cx,
int  cy,
int  w,
int  h,
int  s,
int  e,
int  color 
)

Definition at line 2053 of file gd.c.

◆ gdImageBmp()

void gdImageBmp ( gdImagePtr  im,
FILE outFile,
int  compression 
)

Definition at line 128 of file gd_bmp.c.

References compression, gdImageBmpCtx(), gdNewFileCtx(), NULL, and out.

Referenced by writebmp().

◆ gdImageBmpCtx()

void gdImageBmpCtx ( gdImagePtr  im,
gdIOCtxPtr  out,
int  compression 
)

Definition at line 147 of file gd_bmp.c.

References _gdImageBmpCtx(), compression, and out.

◆ gdImageBmpPtr()

void* gdImageBmpPtr ( gdImagePtr  im,
int size,
int  compression 
)

Definition at line 87 of file gd_bmp.c.

References _gdImageBmpCtx(), compression, gdDPExtractData(), gdNewDynamicCtx(), NULL, out, and size.

◆ gdImageBoundsSafe()

int gdImageBoundsSafe ( gdImagePtr  im,
int  x,
int  y 
)

Definition at line 1858 of file gd.c.

◆ gdImageBrightness()

int gdImageBrightness ( gdImagePtr  src,
int  brightness 
)

Function: gdImageBrightness

Change the brightness of an image

Parameters: src - The image. brightness - The value to add to the color channels of all pixels.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageContrast>
  • <gdImageColor>

Definition at line 305 of file gd_filter.c.

References a, b, f, g, gdImageAlpha, gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageGreen, gdImageRed, gdImageSetPixel(), GET_PIXEL_FUNCTION, NULL, r, link_confs::src, cordic::x, and y.

◆ gdImageChar()

void gdImageChar ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
int  c,
int  color 
)

Function: gdImageChar

Draws a single character.

Parameters: im - The image to draw onto. f - The raster font. x - The x coordinate of the upper left pixel. y - The y coordinate of the upper left pixel. c - The character. color - The color.

Variants:

  • <gdImageCharUp>

See also:

  • <gdFontPtr>

Definition at line 1882 of file gd.c.

◆ gdImageCharUp()

void gdImageCharUp ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
int  c,
int  color 
)

Function: gdImageCharUp

Definition at line 1913 of file gd.c.

◆ gdImageClone()

gdImagePtr gdImageClone ( gdImagePtr  src)

Group: Cloning and Copying Function: gdImageClone

Clones an image

Creates an exact duplicate of the given image.

Parameters: src - The source image.

Returns: The cloned image on success, NULL on failure.

Definition at line 2836 of file gd.c.

◆ gdImageColor()

int gdImageColor ( gdImagePtr  src,
const int  red,
const int  green,
const int  blue,
const int  alpha 
)

Function: gdImageColor

Change channel values of an image

Parameters: src - The image. red - The value to add to the red channel of all pixels. green - The value to add to the green channel of all pixels. blue - The value to add to the blue channel of all pixels. alpha - The value to add to the alpha channel of all pixels.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageBrightness>

Definition at line 445 of file gd_filter.c.

References a, alpha, b, blue, f, g, gdImageAlpha, gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageGreen, gdImageRed, gdImageSetPixel(), GET_PIXEL_FUNCTION, green, NULL, r, red, link_confs::src, cordic::x, and y.

◆ gdImageColorAllocate()

int gdImageColorAllocate ( gdImagePtr  im,
int  r,
int  g,
int  b 
)

Function: gdImageColorAllocate

Allocates a color

This is a simplified variant of <gdImageColorAllocateAlpha> where the alpha channel is always opaque.

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component.

Returns: The color value.

See also:

  • <gdImageColorDeallocate>

Definition at line 741 of file gd.c.

◆ gdImageColorAllocateAlpha()

int gdImageColorAllocateAlpha ( gdImagePtr  im,
int  r,
int  g,
int  b,
int  a 
)

Function: gdImageColorAllocateAlpha

Allocates a color

This is typically used for palette images, but can be used for truecolor images as well.

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component.

Returns: The color value.

See also:

  • <gdImageColorDeallocate>

Definition at line 766 of file gd.c.

◆ gdImageColorClosest()

int gdImageColorClosest ( gdImagePtr  im,
int  r,
int  g,
int  b 
)

Group: Color Function: gdImageColorClosest

Gets the closest color of the image

This is a simplified variant of <gdImageColorClosestAlpha> where the alpha channel is always opaque.

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component.

Returns: The closest color already available in the palette for palette images; the color value of the given components for truecolor images.

See also:

  • <gdImageColorExact>

Definition at line 436 of file gd.c.

◆ gdImageColorClosestAlpha()

int gdImageColorClosestAlpha ( gdImagePtr  im,
int  r,
int  g,
int  b,
int  a 
)

Function: gdImageColorClosestAlpha

Gets the closest color of the image

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component. a - The value of the alpha component.

Returns: The closest color already available in the palette for palette images; the color value of the given components for truecolor images.

See also:

  • <gdImageColorExactAlpha>

Definition at line 460 of file gd.c.

◆ gdImageColorClosestHWB()

int gdImageColorClosestHWB ( gdImagePtr  im,
int  r,
int  g,
int  b 
)

Definition at line 630 of file gd.c.

◆ gdImageColorDeallocate()

void gdImageColorDeallocate ( gdImagePtr  im,
int  color 
)

Function: gdImageColorDeallocate

Removes a palette entry

This is a no-op for truecolor images.

Parameters: im - The image. color - The palette index.

See also:

  • <gdImageColorAllocate>
  • <gdImageColorAllocateAlpha>

Definition at line 881 of file gd.c.

◆ gdImageColorExact()

int gdImageColorExact ( gdImagePtr  im,
int  r,
int  g,
int  b 
)

Function: gdImageColorExact

Gets the exact color of the image

This is a simplified variant of <gdImageColorExactAlpha> where the alpha channel is always opaque.

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component.

Returns: The exact color already available in the palette for palette images; if there is no exact color, -1 is returned. For truecolor images the color value of the given components is returned.

See also:

  • <gdImageColorClosest>

Definition at line 677 of file gd.c.

◆ gdImageColorExactAlpha()

int gdImageColorExactAlpha ( gdImagePtr  im,
int  r,
int  g,
int  b,
int  a 
)

Function: gdImageColorExactAlpha

Gets the exact color of the image

Parameters: im - The image. r - The value of the red component. g - The value of the green component. b - The value of the blue component. a - The value of the alpha component.

Returns: The exact color already available in the palette for palette images; if there is no exact color, -1 is returned. For truecolor images the color value of the given components is returned.

See also:

  • <gdImageColorClosestAlpha>
  • <gdTrueColorAlpha>

Definition at line 703 of file gd.c.

◆ gdImageColorMatch()

◆ gdImageColorReplace()

int gdImageColorReplace ( gdImagePtr  im,
int  src,
int  dst 
)

Definition at line 978 of file gd.c.

◆ gdImageColorReplaceArray()

int gdImageColorReplaceArray ( gdImagePtr  im,
int  len,
int src,
int dst 
)

Definition at line 1053 of file gd.c.

◆ gdImageColorReplaceCallback()

int gdImageColorReplaceCallback ( gdImagePtr  im,
gdCallbackImageColor  callback 
)

Definition at line 1105 of file gd.c.

◆ gdImageColorReplaceThreshold()

int gdImageColorReplaceThreshold ( gdImagePtr  im,
int  src,
int  dst,
float  threshold 
)

Definition at line 1012 of file gd.c.

◆ gdImageColorResolve()

int gdImageColorResolve ( gdImagePtr  im,
int  r,
int  g,
int  b 
)

Definition at line 807 of file gd.c.

◆ gdImageColorResolveAlpha()

int gdImageColorResolveAlpha ( gdImagePtr  im,
int  r,
int  g,
int  b,
int  a 
)

Definition at line 815 of file gd.c.

◆ gdImageColorTransparent()

void gdImageColorTransparent ( gdImagePtr  im,
int  color 
)

Function: gdImageColorTransparent

Sets the transparent color of the image

Parameter: im - The image. color - The color.

See also:

  • <gdImageGetTransparent>

Definition at line 902 of file gd.c.

◆ gdImageCompare()

int gdImageCompare ( gdImagePtr  im1,
gdImagePtr  im2 
)

Function: gdImageCompare

Compare two images

Parameters: im1 - An image. im2 - Another image.

Returns: A bitmask of <Image Comparison> flags where each set flag signals which attributes of the images are different.

Definition at line 3970 of file gd.c.

◆ gdImageContrast()

int gdImageContrast ( gdImagePtr  src,
double  contrast 
)

Function: gdImageContrast

Change the contrast of an image

Parameters: src - The image. contrast - The contrast adjustment value. Negative values increase, postive values decrease the contrast. The larger the absolute value, the stronger the effect.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageBrightness>

Definition at line 367 of file gd_filter.c.

References a, b, f, g, gdImageAlpha, gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageGreen, gdImageRed, gdImageSetPixel(), GET_PIXEL_FUNCTION, NULL, r, link_confs::src, cordic::x, and y.

◆ gdImageConvolution()

int gdImageConvolution ( gdImagePtr  src,
float  filter[3][3],
float  filter_div,
float  offset 
)

Function: gdImageConvolution

Apply a convolution matrix to an image

Depending on the matrix a wide range of effects can be accomplished, e.g. blurring, sharpening, embossing and edge detection.

Parameters: src - The image. filter - The 3x3 convolution matrix. filter_div - The value to divide the convoluted channel values by. offset - The value to add to the convoluted channel values.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageEdgeDetectQuick>
  • <gdImageGaussianBlur>
  • <gdImageEmboss>
  • <gdImageMeanRemoval>
  • <gdImageSmooth>

Definition at line 511 of file gd_filter.c.

References f, filter, gdImageAlpha, gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageCopy(), gdImageCreateTrueColor(), gdImageDestroy(), gdImageFill(), gdImageGreen, gdImageRed, gdImageSaveAlpha(), gdImageSetPixel(), GET_PIXEL_FUNCTION, i, j, MAX, MIN, NULL, offset, link_confs::src, cordic::x, and y.

◆ gdImageCopy()

void gdImageCopy ( gdImagePtr  dst,
gdImagePtr  src,
int  dstX,
int  dstY,
int  srcX,
int  srcY,
int  w,
int  h 
)

Function: gdImageCopy

Copy an area of an image to another image

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the upper left corner to copy to. dstY - The y-coordinate of the upper left corner to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. w - The width of the area to copy. h - The height of the area to copy.

See also:

  • <gdImageCopyMerge>
  • <gdImageCopyMergeGray>

Definition at line 2943 of file gd.c.

◆ gdImageCopyGaussianBlurred()

◆ gdImageCopyMerge()

void gdImageCopyMerge ( gdImagePtr  dst,
gdImagePtr  src,
int  dstX,
int  dstY,
int  srcX,
int  srcY,
int  w,
int  h,
int  pct 
)

Function: gdImageCopyMerge

Copy an area of an image to another image ignoring alpha

The source area will be copied to the destination are by merging the pixels.

Note: This function is a substitute for real alpha channel operations, so it doesn't pay attention to the alpha channel.

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the upper left corner to copy to. dstY - The y-coordinate of the upper left corner to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. w - The width of the area to copy. h - The height of the area to copy. pct - The percentage in range 0..100.

See also:

  • <gdImageCopy>
  • <gdImageCopyMergeGray>

Definition at line 3056 of file gd.c.

◆ gdImageCopyMergeGray()

void gdImageCopyMergeGray ( gdImagePtr  dst,
gdImagePtr  src,
int  dstX,
int  dstY,
int  srcX,
int  srcY,
int  w,
int  h,
int  pct 
)

Function: gdImageCopyMergeGray

Copy an area of an image to another image ignoring alpha

The source area will be copied to the grayscaled destination area by merging the pixels.

Note: This function is a substitute for real alpha channel operations, so it doesn't pay attention to the alpha channel.

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the upper left corner to copy to. dstY - The y-coordinate of the upper left corner to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. w - The width of the area to copy. h - The height of the area to copy. pct - The percentage of the source color intensity in range 0..100.

See also:

  • <gdImageCopy>
  • <gdImageCopyMerge>

Definition at line 3125 of file gd.c.

◆ gdImageCopyResampled()

void gdImageCopyResampled ( gdImagePtr  dst,
gdImagePtr  src,
int  dstX,
int  dstY,
int  srcX,
int  srcY,
int  dstW,
int  dstH,
int  srcW,
int  srcH 
)

Function: gdImageCopyResampled

Copy a resampled area from an image to another image

If the source and destination area differ in size, the area will be resized using bilinear interpolation for truecolor images, and nearest-neighbor interpolation for palette images.

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the upper left corner to copy to. dstY - The y-coordinate of the upper left corner to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. dstW - The width of the area to copy to. dstH - The height of the area to copy to. srcW - The width of the area to copy from. srcH - The height of the area to copy from.

See also:

  • <gdImageCopyResized>
  • <gdImageScale>

Definition at line 3464 of file gd.c.

◆ gdImageCopyResized()

void gdImageCopyResized ( gdImagePtr  dst,
gdImagePtr  src,
int  dstX,
int  dstY,
int  srcX,
int  srcY,
int  dstW,
int  dstH,
int  srcW,
int  srcH 
)

Function: gdImageCopyResized

Copy a resized area from an image to another image

If the source and destination area differ in size, the area will be resized using nearest-neighbor interpolation.

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the upper left corner to copy to. dstY - The y-coordinate of the upper left corner to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. dstW - The width of the area to copy to. dstH - The height of the area to copy to. srcW - The width of the area to copy from. srcH - The height of the area to copy from.

See also:

  • <gdImageCopyResampled>
  • <gdImageScale>

Definition at line 3207 of file gd.c.

◆ gdImageCopyRotated()

void gdImageCopyRotated ( gdImagePtr  dst,
gdImagePtr  src,
double  dstX,
double  dstY,
int  srcX,
int  srcY,
int  srcWidth,
int  srcHeight,
int  angle 
)

Function: gdImageCopyRotated

Copy a rotated area from an image to another image

The area is counter-clockwise rotated using nearest-neighbor interpolation.

Parameters: dst - The destination image. src - The source image. dstX - The x-coordinate of the center of the area to copy to. dstY - The y-coordinate of the center of the area to copy to. srcX - The x-coordinate of the upper left corner to copy from. srcY - The y-coordinate of the upper left corner to copy from. srcW - The width of the area to copy from. srcH - The height of the area to copy from. angle - The angle in degrees.

See also:

  • <gdImageRotateInterpolated>

Definition at line 3356 of file gd.c.

◆ gdImageCreate()

gdImagePtr gdImageCreate ( int  sx,
int  sy 
)

Group: Creation and Destruction

Definition at line 181 of file gd.c.

◆ gdImageCreateFromBmp()

gdImagePtr gdImageCreateFromBmp ( FILE inFile)

Definition at line 473 of file gd_bmp.c.

References gdImageCreateFromBmpCtx(), gdNewFileCtx(), in, inFile, and NULL.

◆ gdImageCreateFromBmpCtx()

◆ gdImageCreateFromBmpPtr()

gdImagePtr gdImageCreateFromBmpPtr ( int  size,
void data 
)

Definition at line 486 of file gd_bmp.c.

References data, gdImageCreateFromBmpCtx(), gdNewDynamicCtxEx(), in, NULL, and size.

◆ gdImageCreateFromFile()

gdImagePtr gdImageCreateFromFile ( const char *  filename)

Definition at line 183 of file gd_filename.c.

References entry, fclose, FILE, filename, fopen, ftype(), NULL, and check-static-inits::result.

◆ gdImageCreateFromGd()

gdImagePtr gdImageCreateFromGd ( FILE in)

Definition at line 416 of file gd_gd.c.

References _noGdError(), and NULL.

Referenced by main().

◆ gdImageCreateFromGd2()

gdImagePtr gdImageCreateFromGd2 ( FILE in)

Definition at line 1147 of file gd_gd2.c.

References _noGd2Error(), and NULL.

Referenced by main().

◆ gdImageCreateFromGd2Ctx()

gdImagePtr gdImageCreateFromGd2Ctx ( gdIOCtxPtr  in)

Definition at line 1153 of file gd_gd2.c.

References _noGd2Error(), and NULL.

◆ gdImageCreateFromGd2Part()

gdImagePtr gdImageCreateFromGd2Part ( FILE in,
int  srcx,
int  srcy,
int  w,
int  h 
)

Definition at line 1159 of file gd_gd2.c.

References _noGd2Error(), and NULL.

Referenced by main().

◆ gdImageCreateFromGd2PartCtx()

gdImagePtr gdImageCreateFromGd2PartCtx ( gdIOCtxPtr  in,
int  srcx,
int  srcy,
int  w,
int  h 
)

◆ gdImageCreateFromGd2PartPtr()

gdImagePtr gdImageCreateFromGd2PartPtr ( int  size,
void data,
int  srcx,
int  srcy,
int  w,
int  h 
)

Definition at line 1177 of file gd_gd2.c.

References _noGd2Error(), and NULL.

◆ gdImageCreateFromGd2Ptr()

gdImagePtr gdImageCreateFromGd2Ptr ( int  size,
void data 
)

Definition at line 1165 of file gd_gd2.c.

References _noGd2Error(), and NULL.

Referenced by main().

◆ gdImageCreateFromGdCtx()

gdImagePtr gdImageCreateFromGdCtx ( gdIOCtxPtr  in)

Definition at line 428 of file gd_gd.c.

References _noGdError(), and NULL.

◆ gdImageCreateFromGdPtr()

gdImagePtr gdImageCreateFromGdPtr ( int  size,
void data 
)

Definition at line 422 of file gd_gd.c.

References _noGdError(), and NULL.

Referenced by main().

◆ gdImageCreateFromGif()

gdImagePtr gdImageCreateFromGif ( FILE fd)

Definition at line 156 of file gd_gif_in.c.

References gdIOCtx::gd_free, gdImageCreateFromGifCtx(), gdNewFileCtx(), and NULL.

Referenced by main().

◆ gdImageCreateFromGifCtx()

◆ gdImageCreateFromGifPtr()

gdImagePtr gdImageCreateFromGifPtr ( int  size,
void data 
)

Definition at line 179 of file gd_gif_in.c.

References data, gdImageCreateFromGifCtx(), gdNewDynamicCtxEx(), in, and size.

◆ gdImageCreateFromJpeg()

gdImagePtr gdImageCreateFromJpeg ( FILE infile)

Definition at line 1230 of file gd_jpeg.c.

References _noJpegError(), and NULL.

Referenced by main().

◆ gdImageCreateFromJpegCtx()

gdImagePtr gdImageCreateFromJpegCtx ( gdIOCtx infile)

Definition at line 1254 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageCreateFromJpegCtxEx()

gdImagePtr gdImageCreateFromJpegCtxEx ( gdIOCtx infile,
int  ignore_warning 
)

Definition at line 1260 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageCreateFromJpegEx()

gdImagePtr gdImageCreateFromJpegEx ( FILE infile,
int  ignore_warning 
)

Definition at line 1236 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageCreateFromJpegPtr()

gdImagePtr gdImageCreateFromJpegPtr ( int  size,
void data 
)

Definition at line 1242 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageCreateFromJpegPtrEx()

gdImagePtr gdImageCreateFromJpegPtrEx ( int  size,
void data,
int  ignore_warning 
)

Definition at line 1248 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageCreateFromPng()

gdImagePtr gdImageCreateFromPng ( FILE fd)

Definition at line 1099 of file gd_png.c.

References _noPngError(), and NULL.

Referenced by main(), ps2png(), and PSImage::writeEPSImage().

◆ gdImageCreateFromPngCtx()

gdImagePtr gdImageCreateFromPngCtx ( gdIOCtxPtr  in)

◆ gdImageCreateFromPngPtr()

gdImagePtr gdImageCreateFromPngPtr ( int  size,
void data 
)

Definition at line 1105 of file gd_png.c.

References NULL.

Referenced by main().

◆ gdImageCreateFromPngSource()

gdImagePtr gdImageCreateFromPngSource ( gdSourcePtr  in)

Definition at line 56 of file gd_ss.c.

References gd_error(), NULL, and void.

Referenced by main().

◆ gdImageCreateFromTga()

gdImagePtr gdImageCreateFromTga ( FILE fp)

File: TGA Input

Read TGA images.

Definition at line 30 of file gd_tga.c.

References fp, gdImageCreateFromTgaCtx(), gdNewFileCtx(), image, in, and NULL.

◆ gdImageCreateFromTgaCtx()

gdImagePtr gdImageCreateFromTgaCtx ( gdIOCtx ctx)

Populate GD image object Copy the pixel data from our tga bitmap buffer into the GD image Disable blending and save the alpha channel per default

Populate GD image object Copy the pixel data from our tga bitmap buffer into the GD image Disable blending and save the alpha channel per default

Definition at line 62 of file gd_tga.c.

References a, oTga_::alphabits, oTga_::bitmap, oTga_::bits, oTga_::fliph, oTga_::flipv, free_tga(), gdAlphaMax, gdImageAlphaBlending(), gdImageCreateTrueColor(), gdImageFlipBoth(), gdImageFlipHorizontal(), gdImageFlipVertical(), gdImageSaveAlpha(), gdMalloc(), gdTrueColor, gdTrueColorAlpha, oTga_::height, oTga_::ident, image, NULL, read_header_tga(), read_image_tga(), TGA_BPP_24, TGA_BPP_32, oTga_::width, cordic::x, and y.

◆ gdImageCreateFromTgaPtr()

gdImagePtr gdImageCreateFromTgaPtr ( int  size,
void data 
)

Definition at line 43 of file gd_tga.c.

References data, gdImageCreateFromTgaCtx(), gdNewDynamicCtxEx(), in, NULL, and size.

◆ gdImageCreateFromTiff()

gdImagePtr gdImageCreateFromTiff ( FILE inFile)

Definition at line 1090 of file gd_tiff.c.

References _noTiffError(), and NULL.

◆ gdImageCreateFromTiffCtx()

gdImagePtr gdImageCreateFromTiffCtx ( gdIOCtx infile)

Definition at line 1084 of file gd_tiff.c.

References _noTiffError(), and NULL.

◆ gdImageCreateFromTiffPtr()

gdImagePtr gdImageCreateFromTiffPtr ( int  size,
void data 
)

Definition at line 1096 of file gd_tiff.c.

References _noTiffError(), and NULL.

◆ gdImageCreateFromWBMP()

gdImagePtr gdImageCreateFromWBMP ( FILE inFile)

Definition at line 234 of file gd_wbmp.c.

References gdImageCreateFromWBMPCtx(), gdNewFileCtx(), in, inFile, and NULL.

Referenced by main().

◆ gdImageCreateFromWBMPCtx()

◆ gdImageCreateFromWBMPPtr()

gdImagePtr gdImageCreateFromWBMPPtr ( int  size,
void data 
)

Definition at line 255 of file gd_wbmp.c.

References data, gdImageCreateFromWBMPCtx(), gdNewDynamicCtxEx(), in, and size.

◆ gdImageCreateFromWebp()

gdImagePtr gdImageCreateFromWebp ( FILE inFile)

Definition at line 372 of file gd_webp.c.

References _noWebpError(), and NULL.

◆ gdImageCreateFromWebpCtx()

gdImagePtr gdImageCreateFromWebpCtx ( gdIOCtx infile)

Definition at line 384 of file gd_webp.c.

References _noWebpError(), and NULL.

◆ gdImageCreateFromWebpPtr()

gdImagePtr gdImageCreateFromWebpPtr ( int  size,
void data 
)

Definition at line 378 of file gd_webp.c.

References _noWebpError(), and NULL.

◆ gdImageCreateFromXbm()

◆ gdImageCreateFromXpm()

gdImagePtr gdImageCreateFromXpm ( char *  filename)

File: XPM Input

Read XPM images.

Definition at line 29 of file gdxpm.c.

References filename, GD_ERROR, gd_error_ex(), NULL, and void.

◆ gdImageCreatePaletteFromTrueColor()

gdImagePtr gdImageCreatePaletteFromTrueColor ( gdImagePtr  im,
int  dither,
int  colorsWanted 
)

Function: gdImageCreatePaletteFromTrueColor

Creates a new palette image from a truecolor image

Parameters: im - The image. dither - Whether dithering should be applied. colorsWanted - The number of desired palette entries.

Returns: A newly create palette image; NULL on failure.

See also:

  • <gdImageCreatePaletteFromTrueColor>
  • <gdImageTrueColorToPaletteSetMethod>
  • <gdImageNeuQuant>

Definition at line 1460 of file gd_topal.c.

References dither, gdImageTrueColorToPaletteBody(), NULL, and TRUE.

Referenced by _gdImageGifAnimAddCtx(), and _gdImageGifCtx().

◆ gdImageCreateTrueColor()

gdImagePtr gdImageCreateTrueColor ( int  sx,
int  sy 
)

Definition at line 289 of file gd.c.

◆ gdImageCrop()

gdImagePtr gdImageCrop ( gdImagePtr  src,
const gdRect crop 
)

Function: gdImageCrop

Crop an image to a given rectangle

Parameters: src - The image. crop - The cropping rectangle, see <gdRect>.

Returns: The newly created cropped image, or NULL on failure.

See also:

  • <gdImageCropAuto>
  • <gdImageCropThreshold>

Definition at line 48 of file gd_crop.c.

References link_confs::dst, gdEffectReplace, gdImageAlphaBlending(), gdImageCopy(), gdImageCreate(), gdImageCreateTrueColor(), gdImageTrueColor, gdRect::height, NULL, link_confs::src, gdRect::width, gdRect::x, and gdRect::y.

◆ gdImageCropAuto()

gdImagePtr gdImageCropAuto ( gdImagePtr  im,
const unsigned int  mode 
)

Function: gdImageCropAuto

Crop an image automatically

This function detects the cropping area according to the given mode.

Parameters: im - The image. mode - The cropping mode, see <gdCropMode>.

Returns: The newly created cropped image, or NULL on failure.

See also:

  • <gdImageCrop>
  • <gdImageCropThreshold>

Definition at line 85 of file gd_crop.c.

References GD_CROP_BLACK, GD_CROP_DEFAULT, GD_CROP_SIDES, GD_CROP_TRANSPARENT, GD_CROP_WHITE, gdGuessBackgroundColorFromCorners(), gdImageColorClosestAlpha(), gdImageCrop(), gdImageGetPixel(), gdImageGetTransparent, gdImageSX, gdImageSY, gdRect::height, height, match, mode, NULL, gdRect::width, width, cordic::x, gdRect::x, y, and gdRect::y.

◆ gdImageCropThreshold()

gdImagePtr gdImageCropThreshold ( gdImagePtr  im,
const unsigned int  color,
const float  threshold 
)

Function: gdImageCropThreshold

Crop an image using a given color

The threshold defines the tolerance to be used while comparing the image color and the color to crop. The method used to calculate the color difference is based on the color distance in the RGB(A) cube.

Parameters: im - The image. color - The crop color. threshold - The crop threshold.

Returns: The newly created cropped image, or NULL on failure.

See also:

  • <gdImageCrop>
  • <gdImageCropAuto>

Definition at line 188 of file gd_crop.c.

References gdColorMatch(), gdImageColorsTotal, gdImageCrop(), gdImageGetPixel(), gdImageSX, gdImageSY, gdImageTrueColor, gdRect::height, height, match, NULL, threshold, gdRect::width, width, cordic::x, gdRect::x, y, and gdRect::y.

◆ gdImageDashedLine()

void gdImageDashedLine ( gdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 1714 of file gd.c.

◆ gdImageDestroy()

void gdImageDestroy ( gdImagePtr  im)

Definition at line 387 of file gd.c.

◆ gdImageEdgeDetectQuick()

int gdImageEdgeDetectQuick ( gdImagePtr  src)

Function: gdImageEdgeDetectQuick

Edge detection of an image

(see edge_detect_quick.jpg)

Parameters: src - The image.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageMeanRemoval>
  • <gdImageConvolution>

Definition at line 710 of file gd_filter.c.

References filter, gdImageConvolution(), and link_confs::src.

◆ gdImageEllipse()

void gdImageEllipse ( gdImagePtr  im,
int  cx,
int  cy,
int  w,
int  h,
int  color 
)

Definition at line 2184 of file gd.c.

◆ gdImageEmboss()

int gdImageEmboss ( gdImagePtr  im)

Function: gdImageEmboss

Emboss an image

(see emboss.jpg)

Parameters: im - The image.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageConvolution>

Definition at line 766 of file gd_filter.c.

References filter, and gdImageConvolution().

◆ gdImageFile()

int gdImageFile ( gdImagePtr  im,
const char *  filename 
)

Definition at line 239 of file gd_filename.c.

References entry, fclose, FILE, filename, fopen, ftype(), GD_FALSE, and GD_TRUE.

◆ gdImageFill()

void gdImageFill ( gdImagePtr  im,
int  x,
int  y,
int  color 
)

Definition at line 2436 of file gd.c.

◆ gdImageFilledArc()

void gdImageFilledArc ( gdImagePtr  im,
int  cx,
int  cy,
int  w,
int  h,
int  s,
int  e,
int  color,
int  style 
)

Definition at line 2062 of file gd.c.

◆ gdImageFilledEllipse()

void gdImageFilledEllipse ( gdImagePtr  im,
int  cx,
int  cy,
int  w,
int  h,
int  color 
)

Definition at line 2231 of file gd.c.

◆ gdImageFilledPolygon()

void gdImageFilledPolygon ( gdImagePtr  im,
gdPointPtr  p,
int  n,
int  c 
)

Function: gdImageFilledPolygon

Draws a filled polygon

The polygon is filled using the even-odd fillrule what can leave unfilled regions inside of self-intersecting polygons. This behavior might change in a future version.

Parameters: im - The image. p - The vertices as array of <gdPoint>s. n - The number of vertices. c - The color

See also:

  • <gdImagePolygon>

Definition at line 3655 of file gd.c.

◆ gdImageFilledRectangle()

void gdImageFilledRectangle ( gdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 2813 of file gd.c.

◆ gdImageFillToBorder()

void gdImageFillToBorder ( gdImagePtr  im,
int  x,
int  y,
int  border,
int  color 
)

Definition at line 2287 of file gd.c.

◆ gdImageFlipBoth()

void gdImageFlipBoth ( gdImagePtr  im)

Function: gdImageFlipBoth

Flip an image vertically and horizontally

The image is mirrored upside-down and left-right.

Parameters: im - The image.

See also:

  • <gdImageFlipVertical>
  • <gdImageFlipHorizontal>

Definition at line 118 of file gd_transform.c.

References gdImageFlipHorizontal(), and gdImageFlipVertical().

Referenced by gdImageCreateFromTgaCtx().

◆ gdImageFlipHorizontal()

void gdImageFlipHorizontal ( gdImagePtr  im)

Function: gdImageFlipHorizontal

Flip an image horizontally

The image is mirrored left-right.

Parameters: im - The image.

See also:

  • <gdImageFlipVertical>
  • <gdImageFlipBoth>

Definition at line 68 of file gd_transform.c.

References gdImageStruct::pixels, gdImageStruct::sx, gdImageStruct::sy, gdImageStruct::tpixels, gdImageStruct::trueColor, cordic::x, and y.

Referenced by gdImageCreateFromTgaCtx().

◆ gdImageFlipVertical()

void gdImageFlipVertical ( gdImagePtr  im)

File: Transformations Function: gdImageFlipVertical

Flip an image vertically

The image is mirrored upside-down.

Parameters: im - The image.

See also:

  • <gdImageFlipHorizontal>
  • <gdImageFlipBoth>

Definition at line 26 of file gd_transform.c.

References p, gdImageStruct::pixels, gdImageStruct::sx, gdImageStruct::sy, gdImageStruct::tpixels, gdImageStruct::trueColor, cordic::x, and y.

Referenced by gdImageCreateFromTgaCtx().

◆ gdImageGaussianBlur()

int gdImageGaussianBlur ( gdImagePtr  im)

Definition at line 739 of file gd_filter.c.

References filter, and gdImageConvolution().

◆ gdImageGd()

void gdImageGd ( gdImagePtr  im,
FILE out 
)

Definition at line 434 of file gd_gd.c.

References _noGdError().

Referenced by main().

◆ gdImageGd2()

void gdImageGd2 ( gdImagePtr  im,
FILE out,
int  cs,
int  fmt 
)

Definition at line 1184 of file gd_gd2.c.

References _noGd2Error().

Referenced by main().

◆ gdImageGd2Ptr()

void* gdImageGd2Ptr ( gdImagePtr  im,
int  cs,
int  fmt,
int size 
)

Definition at line 1189 of file gd_gd2.c.

References _noGd2Error(), and NULL.

Referenced by main().

◆ gdImageGdPtr()

void* gdImageGdPtr ( gdImagePtr  im,
int size 
)

Definition at line 439 of file gd_gd.c.

References _noGdError(), and NULL.

Referenced by main().

◆ gdImageGetClip()

void gdImageGetClip ( gdImagePtr  im,
int x1P,
int y1P,
int x2P,
int y2P 
)

Function: gdImageGetClip

Gets the current clipping rectangle

Parameters: im - The image. x1P - (out) The x-coordinate of the upper left corner. y1P - (out) The y-coordinate of the upper left corner. x2P - (out) The x-coordinate of the lower right corner. y2P - (out) The y-coordinate of the lower right corner.

See also:

  • <gdImageSetClip>

Definition at line 4286 of file gd.c.

◆ gdImageGetInterpolationMethod()

gdInterpolationMethod gdImageGetInterpolationMethod ( gdImagePtr  im)

Function: gdImageGetInterpolationMethod

Get the current interpolation method

This is here so that the value can be read via a language or VM with an FFI but no (portable) way to extract the value from the struct.

Parameters: im - The image.

Returns: The current interpolation method.

See also:

  • <gdInterpolationMethod>
  • <gdImageSetInterpolationMethod>

Definition at line 2336 of file gd_interpolation.c.

References gdImageStruct::interpolation_id.

◆ gdImageGetPixel()

int gdImageGetPixel ( gdImagePtr  im,
int  x,
int  y 
)

Function: gdImageGetPixel

Gets a pixel color as stored in the image.

Parameters: im - The image. x - The x-coordinate. y - The y-coordinate.

See also:

  • <gdImageGetTrueColorPixel>
  • <gdImagePalettePixel>
  • <gdImageTrueColorPixel>

Definition at line 1443 of file gd.c.

◆ gdImageGetTrueColorPixel()

int gdImageGetTrueColorPixel ( gdImagePtr  im,
int  x,
int  y 
)

Function: gdImageGetTrueColorPixel

Gets a pixel color always as truecolor value.

Parameters: im - The image. x - The x-coordinate. y - The y-coordinate.

See also:

  • <gdImageGetPixel>
  • <gdImageTrueColorPixel>

Definition at line 1470 of file gd.c.

◆ gdImageGif()

void gdImageGif ( gdImagePtr  im,
FILE out 
)

Definition at line 207 of file gd_gif_out.c.

References gdImageGifCtx(), gdNewFileCtx(), NULL, and out.

Referenced by main(), and WriteImage().

◆ gdImageGifAnimAdd()

void gdImageGifAnimAdd ( gdImagePtr  im,
FILE outFile,
int  LocalCM,
int  LeftOfs,
int  TopOfs,
int  Delay,
int  Disposal,
gdImagePtr  previm 
)

Definition at line 610 of file gd_gif_out.c.

References gdImageGifAnimAddCtx(), gdNewFileCtx(), NULL, and out.

Referenced by main().

◆ gdImageGifAnimAddCtx()

void gdImageGifAnimAddCtx ( gdImagePtr  im,
gdIOCtx out,
int  LocalCM,
int  LeftOfs,
int  TopOfs,
int  Delay,
int  Disposal,
gdImagePtr  previm 
)

◆ gdImageGifAnimAddPtr()

void* gdImageGifAnimAddPtr ( gdImagePtr  im,
int size,
int  LocalCM,
int  LeftOfs,
int  TopOfs,
int  Delay,
int  Disposal,
gdImagePtr  previm 
)

Definition at line 487 of file gd_gif_out.c.

References _gdImageGifAnimAddCtx(), gdDPExtractData(), gdNewDynamicCtx(), NULL, out, and size.

◆ gdImageGifAnimBegin()

void gdImageGifAnimBegin ( gdImagePtr  im,
FILE outFile,
int  GlobalCM,
int  Loops 
)

Definition at line 361 of file gd_gif_out.c.

References gdImageGifAnimBeginCtx(), gdNewFileCtx(), NULL, and out.

Referenced by main().

◆ gdImageGifAnimBeginCtx()

void gdImageGifAnimBeginCtx ( gdImagePtr  im,
gdIOCtx out,
int  GlobalCM,
int  Loops 
)

◆ gdImageGifAnimBeginPtr()

void* gdImageGifAnimBeginPtr ( gdImagePtr  im,
int size,
int  GlobalCM,
int  Loops 
)

Definition at line 299 of file gd_gif_out.c.

References gdDPExtractData(), gdImageGifAnimBeginCtx(), gdNewDynamicCtx(), NULL, out, and size.

◆ gdImageGifAnimEnd()

void gdImageGifAnimEnd ( FILE outFile)

Definition at line 898 of file gd_gif_out.c.

References gdImageGifAnimEndCtx(), gdNewFileCtx(), NULL, out, and putc.

Referenced by main().

◆ gdImageGifAnimEndCtx()

void gdImageGifAnimEndCtx ( gdIOCtx out)

Definition at line 962 of file gd_gif_out.c.

References gdPutC(), and out.

◆ gdImageGifAnimEndPtr()

void* gdImageGifAnimEndPtr ( int size)

Definition at line 936 of file gd_gif_out.c.

References gdMalloc(), and size.

◆ gdImageGifCtx()

void gdImageGifCtx ( gdImagePtr  im,
gdIOCtx out 
)

◆ gdImageGifPtr()

void* gdImageGifPtr ( gdImagePtr  im,
int size 
)

Definition at line 134 of file gd_gif_out.c.

References _gdImageGifCtx(), gdDPExtractData(), gdNewDynamicCtx(), NULL, out, and size.

◆ gdImageGrayScale()

int gdImageGrayScale ( gdImagePtr  src)

Function: gdImageGrayScale

Convert an image to grayscale

The red, green and blue components of each pixel are replaced by their weighted sum using the same coefficients as the REC.601 luma (Y') calculation. The alpha components are retained.

For palette images the result may differ due to palette limitations.

Parameters: src - The image.

Returns: Non-zero on success, zero on failure.

Definition at line 251 of file gd_filter.c.

References a, b, f, g, gdEffectReplace, gdImageAlpha, gdImageAlphaBlending(), gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageGreen, gdImageRed, gdImageSetPixel(), GET_PIXEL_FUNCTION, int(), NULL, r, link_confs::src, cordic::x, and y.

◆ gdImageInterlace()

void gdImageInterlace ( gdImagePtr  im,
int  interlaceArg 
)

Function: gdImageInterlace

Sets whether an image is interlaced

This is relevant only when saving the image in a format that supports interlacing.

Parameters: im - The image. interlaceArg - Whether the image is interlaced.

See also:

  • <gdImageGetInterlaced>

Definition at line 3952 of file gd.c.

◆ gdImageJpeg()

void gdImageJpeg ( gdImagePtr  im,
FILE out,
int  quality 
)

Definition at line 1214 of file gd_jpeg.c.

References _noJpegError().

Referenced by dotest(), and main().

◆ gdImageJpegCtx()

void gdImageJpegCtx ( gdImagePtr  im,
gdIOCtx out,
int  quality 
)

Definition at line 1225 of file gd_jpeg.c.

References _noJpegError().

◆ gdImageJpegPtr()

void* gdImageJpegPtr ( gdImagePtr  im,
int size,
int  quality 
)

Definition at line 1219 of file gd_jpeg.c.

References _noJpegError(), and NULL.

◆ gdImageLine()

void gdImageLine ( gdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Definition at line 1544 of file gd.c.

◆ gdImageMeanRemoval()

int gdImageMeanRemoval ( gdImagePtr  im)

Function: gdImageMeanRemoval

Mean removal of an image

(see mean_removal.jpg)

Parameters: im - The image.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageEdgeDetectQuick>
  • <gdImageConvolution>

Definition at line 797 of file gd_filter.c.

References filter, and gdImageConvolution().

◆ gdImageNegate()

int gdImageNegate ( gdImagePtr  src)

Function: gdImageNegate

Invert an image

Parameters: src - The image.

Returns: Non-zero on success, zero on failure.

Definition at line 203 of file gd_filter.c.

References a, b, f, g, gdImageAlpha, gdImageBlue, gdImageColorAllocateAlpha(), gdImageColorClosestAlpha(), gdImageGreen, gdImageRed, gdImageSetPixel(), GET_PIXEL_FUNCTION, NULL, r, link_confs::src, cordic::x, and y.

◆ gdImageNeuQuant()

gdImagePtr gdImageNeuQuant ( gdImagePtr  im,
const int  max_color,
int  sample_factor 
)

Function: gdImageNeuQuant

Creates a new palette image from a truecolor image

This is the same as calling <gdImageCreatePaletteFromTrueColor> with the quantization method <GD_QUANT_NEUQUANT>.

Parameters: im - The image. max_color - The number of desired palette entries. sample_factor - The quantization precision between 1 (highest quality) and 10 (fastest).

Returns: A newly create palette image; NULL on failure.

Definition at line 512 of file gd_nnquant.c.

References ALPHA, BLUE, c, d, link_confs::dst, gd_error(), gdFree(), gdImageAlpha, gdImageBlue, gdImageCreate(), gdImageGreen, gdImageRed, gdImageSX, gdImageSY, gdMalloc(), getcolormap(), GREEN, i, initnet(), inxbuild(), inxsearch(), learn(), map, MAXNETSIZE, NULL, offset, overflow2(), p, RED, row, gdImageStruct::tpixels, unbiasnet(), verbose, and cordic::x.

Referenced by gdImageTrueColorToPaletteBody().

◆ gdImageOpenPolygon()

void gdImageOpenPolygon ( gdImagePtr  im,
gdPointPtr  p,
int  n,
int  c 
)

Function: gdImageOpenPolygon

Draws an open polygon

Parameters: im - The image. p - The vertices as array of <gdPoint>s. n - The number of vertices. c - The color

See also:

  • <gdImagePolygon>

Definition at line 3610 of file gd.c.

◆ gdImagePaletteCopy()

void gdImagePaletteCopy ( gdImagePtr  dst,
gdImagePtr  src 
)

Definition at line 923 of file gd.c.

◆ gdImagePaletteToTrueColor()

int gdImagePaletteToTrueColor ( gdImagePtr  src)

Function: gdImagePaletteToTrueColor

Convert a palette image to true color

Parameters: src - The image.

Returns: Non-zero if the conversion succeeded, zero otherwise.

See also:

  • <gdImageTrueColorToPalette>

Definition at line 4479 of file gd.c.

◆ gdImagePixelate()

◆ gdImagePng()

void gdImagePng ( gdImagePtr  im,
FILE out 
)

Definition at line 1120 of file gd_png.c.

References _noPngError().

Referenced by dotest(), gdImageStringFTCircle(), main(), and testDrawing().

◆ gdImagePngCtx()

void gdImagePngCtx ( gdImagePtr  im,
gdIOCtx out 
)

Definition at line 1135 of file gd_png.c.

References _noPngError().

◆ gdImagePngCtxEx()

void gdImagePngCtxEx ( gdImagePtr  im,
gdIOCtx out,
int  level 
)

Definition at line 1140 of file gd_png.c.

References _noPngError().

◆ gdImagePngEx()

void gdImagePngEx ( gdImagePtr  im,
FILE out,
int  level 
)

Definition at line 1115 of file gd_png.c.

References _noPngError().

Referenced by WriteImage().

◆ gdImagePngPtr()

void* gdImagePngPtr ( gdImagePtr  im,
int size 
)

Definition at line 1125 of file gd_png.c.

References NULL.

Referenced by main().

◆ gdImagePngPtrEx()

void* gdImagePngPtrEx ( gdImagePtr  im,
int size,
int  level 
)

Definition at line 1130 of file gd_png.c.

References NULL.

◆ gdImagePngToSink()

void gdImagePngToSink ( gdImagePtr  im,
gdSinkPtr  out 
)

Definition at line 49 of file gd_ss.c.

References gd_error(), and void.

Referenced by main().

◆ gdImagePolygon()

void gdImagePolygon ( gdImagePtr  im,
gdPointPtr  p,
int  n,
int  c 
)

Group: Polygons Function: gdImagePolygon

Draws a closed polygon

Parameters: im - The image. p - The vertices as array of <gdPoint>s. n - The number of vertices. c - The color.

See also:

  • <gdImageOpenPolygon>
  • <gdImageFilledPolygon>

Definition at line 3585 of file gd.c.

◆ gdImageRectangle()

void gdImageRectangle ( gdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2,
int  color 
)

Function: gdImageRectangle

Draws a rectangle.

Parameters: im - The image. x1 - The x-coordinate of one of the corners. y1 - The y-coordinate of one of the corners. x2 - The x-coordinate of another corner. y2 - The y-coordinate of another corner. color - The color.

See also:

  • <gdImageFilledRectangle>

Definition at line 2645 of file gd.c.

◆ gdImageRotateInterpolated()

gdImagePtr gdImageRotateInterpolated ( const gdImagePtr  src,
const float  angle,
int  bgcolor 
)

Function: gdImageRotateInterpolated

Rotate an image

Creates a new image, counter-clockwise rotated by the requested angle using the current <gdInterpolationMethod>. Non-square angles will add a border with bgcolor.

Parameters: src - The source image. angle - The angle in degrees. bgcolor - The color to fill the added background with.

Returns: The rotated image on success, NULL on failure.

See also:

  • <gdImageCopyRotated>

Definition at line 1822 of file gd_interpolation.c.

References cordic::angle, bgcolor, link_confs::dst, floorf(), fmod(), GD_BICUBIC_FIXED, GD_BILINEAR_FIXED, GD_METHOD_COUNT, GD_NEAREST_NEIGHBOUR, gdImageClone(), gdImagePaletteToTrueColor(), gdImageRotate180(), gdImageRotate270(), gdImageRotate90(), gdImageRotateGeneric(), gdImageRotateNearestNeighbour(), gdMaxColors, gdTrueColorAlpha, NULL, and link_confs::src.

◆ gdImageSaveAlpha()

void gdImageSaveAlpha ( gdImagePtr  im,
int  saveAlphaArg 
)

Function: gdImageSaveAlpha

Sets the save alpha flag

The save alpha flag specifies whether the alpha channel of the pixels should be saved. This is supported only for image formats that support full alpha transparency, e.g. PNG.

Definition at line 4216 of file gd.c.

◆ gdImageScale()

gdImagePtr gdImageScale ( const gdImagePtr  src,
const unsigned int  new_width,
const unsigned int  new_height 
)

Function: gdImageScale

Scale an image

Creates a new image, scaled to the requested size using the current <gdInterpolationMethod>.

Note that GD_WEIGHTED4 is not yet supported by this function.

Parameters: src - The source image. new_width - The new width. new_height - The new height.

Returns: The scaled image on success, NULL on failure.

See also:

  • <gdImageCopyResized>
  • <gdImageCopyResampled>

Definition at line 1630 of file gd_interpolation.c.

References GD_BICUBIC, GD_BICUBIC_FIXED, GD_BILINEAR_FIXED, GD_LINEAR, GD_METHOD_COUNT, GD_NEAREST_NEIGHBOUR, gdImageClone(), gdImageScaleBicubicFixed(), gdImageScaleBilinear(), gdImageScaleNearestNeighbour(), gdImageScaleTwoPass(), gdImageSX, gdImageSY, NULL, and link_confs::src.

◆ gdImageScatter()

int gdImageScatter ( gdImagePtr  im,
int  sub,
int  plus 
)

Definition at line 45 of file gd_filter.c.

References GD_SCATTER_SEED, gdImageScatterEx(), s, and sub.

◆ gdImageScatterColor()

int gdImageScatterColor ( gdImagePtr  im,
int  sub,
int  plus,
int  colors[],
unsigned int  num_colors 
)

Definition at line 59 of file gd_filter.c.

References colors, GD_SCATTER_SEED, gdImageScatterEx(), num_colors, s, and sub.

◆ gdImageScatterEx()

int gdImageScatterEx ( gdImagePtr  im,
gdScatterPtr  s 
)

◆ gdImageSelectiveBlur()

◆ gdImageSetAntiAliased()

void gdImageSetAntiAliased ( gdImagePtr  im,
int  c 
)

Function: gdImageSetAntiAliased

Set the color for subsequent anti-aliased drawing

If <gdAntiAliased> is passed as color to drawing operations that support anti-aliased drawing (such as <gdImageLine> and <gdImagePolygon>), the actual color to be used can be set with this function.

Example: draw an anti-aliased blue line: | gdImageSetAntiAliased(im, gdTrueColorAlpha(0, 0, gdBlueMax, gdAlphaOpaque)); | gdImageLine(im, 10,10, 20,20, gdAntiAliased);

Parameters: im - The image. c - The color.

See also:

  • <gdImageSetAntiAliasedDontBlend>

Definition at line 3909 of file gd.c.

◆ gdImageSetAntiAliasedDontBlend()

void gdImageSetAntiAliasedDontBlend ( gdImagePtr  im,
int  c,
int  dont_blend 
)

Function: gdImageSetAntiAliasedDontBlend

Set the color and "dont_blend" color for subsequent anti-aliased drawing

This extended variant of <gdImageSetAntiAliased> allows to also specify a (background) color that will not be blended in anti-aliased drawing operations.

Parameters: im - The image. c - The color. dont_blend - Whether to blend.

Definition at line 3930 of file gd.c.

◆ gdImageSetBrush()

void gdImageSetBrush ( gdImagePtr  im,
gdImagePtr  brush 
)

Function: gdImageSetBrush

Sets the brush for following drawing operations

Parameters: im - The image. brush - The brush image.

Definition at line 3852 of file gd.c.

◆ gdImageSetClip()

void gdImageSetClip ( gdImagePtr  im,
int  x1,
int  y1,
int  x2,
int  y2 
)

Function: gdImageSetClip

Sets the clipping rectangle

The clipping rectangle restricts the drawing area for following drawing operations.

Parameters: im - The image. x1 - The x-coordinate of the upper left corner. y1 - The y-coordinate of the upper left corner. x2 - The x-coordinate of the lower right corner. y2 - The y-coordinate of the lower right corner.

See also:

  • <gdImageGetClip>

Definition at line 4239 of file gd.c.

◆ gdImageSetInterpolationMethod()

int gdImageSetInterpolationMethod ( gdImagePtr  im,
gdInterpolationMethod  id 
)

◆ gdImageSetPixel()

void gdImageSetPixel ( gdImagePtr  im,
int  x,
int  y,
int  color 
)

Group: Pixels

Definition at line 1237 of file gd.c.

◆ gdImageSetResolution()

void gdImageSetResolution ( gdImagePtr  im,
const unsigned int  res_x,
const unsigned int  res_y 
)

Function: gdImageSetResolution

Sets the resolution of an image.

Parameters: im - The image. res_x - The horizontal resolution in DPI. res_y - The vertical resolution in DPI.

See also:

  • <gdImageResolutionX>
  • <gdImageResolutionY>

Definition at line 4308 of file gd.c.

◆ gdImageSetStyle()

void gdImageSetStyle ( gdImagePtr  im,
int style,
int  noOfPixels 
)

Function: gdImageSetStyle

Sets the style for following drawing operations

Parameters: im - The image. style - An array of color values. noOfPixel - The number of color values.

Definition at line 3812 of file gd.c.

◆ gdImageSetThickness()

void gdImageSetThickness ( gdImagePtr  im,
int  thickness 
)

Function: gdImageSetThickness

Sets the thickness for following drawing operations

Parameters: im - The image. thickness - The thickness in pixels.

Definition at line 3838 of file gd.c.

◆ gdImageSetTile()

void gdImageSetTile ( gdImagePtr  im,
gdImagePtr  tile 
)

Definition at line 3872 of file gd.c.

◆ gdImageSmooth()

int gdImageSmooth ( gdImagePtr  im,
float  weight 
)

Function: gdImageSmooth

Smooth an image

(see smooth.jpg)

Parameters: im - The image. weight - The strength of the smoothing.

Returns: Non-zero on success, zero on failure.

See also:

  • <gdImageConvolution>

Definition at line 823 of file gd_filter.c.

References filter, and gdImageConvolution().

◆ gdImageString()

void gdImageString ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
unsigned char *  s,
int  color 
)

Function: gdImageString

Draws a character string.

Parameters: im - The image to draw onto. f - The raster font. x - The x coordinate of the upper left pixel. y - The y coordinate of the upper left pixel. c - The character string. color - The color.

Variants:

  • <gdImageStringUp>
  • <gdImageString16>
  • <gdImageStringUp16>

See also:

  • <gdFontPtr>
  • <gdImageStringTTF>

Definition at line 1963 of file gd.c.

◆ gdImageString16()

void gdImageString16 ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
unsigned short *  s,
int  color 
)

Function: gdImageString16

Definition at line 1995 of file gd.c.

◆ gdImageStringFT()

char* gdImageStringFT ( gdImage im,
int brect,
int  fg,
const char *  fontlist,
double  ptsize,
double  angle,
int  x,
int  y,
const char *  string 
)

Definition at line 130 of file gdft.c.

References cordic::angle, ptsize, void, cordic::x, and y.

Referenced by dosizes(), dowheel(), gdImageStringFTCircle(), and main().

◆ gdImageStringFTEx()

char* gdImageStringFTEx ( gdImage im,
int brect,
int  fg,
const char *  fontlist,
double  ptsize,
double  angle,
int  x,
int  y,
const char *  string,
gdFTStringExtraPtr  strex 
)

Definition at line 112 of file gdft.c.

References cordic::angle, ptsize, void, cordic::x, and y.

Referenced by main().

◆ gdImageStringTTF()

char* gdImageStringTTF ( gdImage im,
int brect,
int  fg,
const char *  fontlist,
double  ptsize,
double  angle,
int  x,
int  y,
const char *  string 
)

Function: gdImageStringTTF

Alias of <gdImageStringFT>.

Definition at line 103 of file gdft.c.

References cordic::angle, gdImageStringFT(), ptsize, cordic::x, and y.

◆ gdImageStringUp()

void gdImageStringUp ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
unsigned char *  s,
int  color 
)

Function: gdImageStringUp

Definition at line 1978 of file gd.c.

◆ gdImageStringUp16()

void gdImageStringUp16 ( gdImagePtr  im,
gdFontPtr  f,
int  x,
int  y,
unsigned short *  s,
int  color 
)

Function: gdImageStringUp16

Definition at line 2010 of file gd.c.

◆ gdImageTiff()

void gdImageTiff ( gdImagePtr  im,
FILE outFile 
)

Definition at line 1102 of file gd_tiff.c.

References _noTiffError().

◆ gdImageTiffCtx()

void gdImageTiffCtx ( gdImagePtr  image,
gdIOCtx out 
)

Definition at line 1079 of file gd_tiff.c.

References _noTiffError().

◆ gdImageTiffPtr()

void* gdImageTiffPtr ( gdImagePtr  im,
int size 
)

Definition at line 1107 of file gd_tiff.c.

References _noTiffError(), and NULL.

◆ gdImageTrueColorToPalette()

int gdImageTrueColorToPalette ( gdImagePtr  im,
int  dither,
int  colorsWanted 
)

Function: gdImageTrueColorToPalette

Converts a truecolor image to a palette image

Parameters: im - The image. dither - Whether dithering should be applied. colorsWanted - The number of desired palette entries.

Returns: Non-zero if the conversion succeeded, zero otherwise.

See also:

  • <gdImageCreatePaletteFromTrueColor>
  • <gdImageTrueColorToPaletteSetMethod>
  • <gdImagePaletteToTrueColor>

Definition at line 1487 of file gd_topal.c.

References dither, and gdImageTrueColorToPaletteBody().

Referenced by main(), and testDrawing().

◆ gdImageTrueColorToPaletteSetMethod()

int gdImageTrueColorToPaletteSetMethod ( gdImagePtr  im,
int  method,
int  speed 
)

Function: gdImageTrueColorToPaletteSetMethod

Selects the quantization method

That quantization method is used for all subsequent <gdImageTrueColorToPalette> and <gdImageCreatePaletteFromTrueColor> calls.

Parameters: im - The image. method - The quantization method, see <gdPaletteQuantizationMethod>. speed - The quantization speed between 1 (highest quality) and 10 (fastest). 0 selects a method-specific default (recommended).

Returns: Zero if the given method is invalid or not available; non-zero otherwise.

See also:

  • <gdImageTrueColorToPaletteSetQuality>

Definition at line 1393 of file gd_topal.c.

References FALSE, GD_QUANT_DEFAULT, GD_QUANT_LIQ, gdImageStruct::paletteQuantizationMethod, gdImageStruct::paletteQuantizationSpeed, and TRUE.

◆ gdImageTrueColorToPaletteSetQuality()

void gdImageTrueColorToPaletteSetQuality ( gdImagePtr  im,
int  min_quality,
int  max_quality 
)

Function: gdImageTrueColorToPaletteSetQuality

Chooses a quality range for quantization

That quality range is used in all subsequent calls to <gdImageTrueColorToPalette> and <gdImageCreatePaletteFromTrueColor> if the quantization method is <GD_QUANT_LIQ>.

Parameters: im - The image. min_quality - The minimum quality in range 1-100 (1 = ugly, 100 = perfect). If the palette cannot represent the image with at least min_quality, then no conversion is done. max_quality - The maximum quality in range 1-100 (1 = ugly, 100 = perfect), which must be higher than the min_quality. If the palette can represent the image with a quality better than max_quality, then fewer colors than requested will be used.

Definition at line 1431 of file gd_topal.c.

References gdImageStruct::paletteQuantizationMaxQuality, and gdImageStruct::paletteQuantizationMinQuality.

◆ gdImageWBMP()

void gdImageWBMP ( gdImagePtr  image,
int  fg,
FILE out 
)

Definition at line 270 of file gd_wbmp.c.

References gdImageWBMPCtx(), gdNewFileCtx(), NULL, and out.

Referenced by main(), and writewbmp().

◆ gdImageWBMPCtx()

void gdImageWBMPCtx ( gdImagePtr  image,
int  fg,
gdIOCtx out 
)

Definition at line 104 of file gd_wbmp.c.

References _gdImageWBMPCtx(), and out.

◆ gdImageWBMPPtr()

void* gdImageWBMPPtr ( gdImagePtr  im,
int size,
int  fg 
)

Definition at line 281 of file gd_wbmp.c.

References _gdImageWBMPCtx(), gdDPExtractData(), gdNewDynamicCtx(), NULL, out, and size.

◆ gdImageWebp()

void gdImageWebp ( gdImagePtr  im,
FILE outFile 
)

Definition at line 400 of file gd_webp.c.

References _noWebpError().

◆ gdImageWebpCtx()

void gdImageWebpCtx ( gdImagePtr  im,
gdIOCtx outfile,
int  quantization 
)

Definition at line 390 of file gd_webp.c.

References _noWebpError().

◆ gdImageWebpEx()

void gdImageWebpEx ( gdImagePtr  im,
FILE outFile,
int  quantization 
)

Definition at line 395 of file gd_webp.c.

References _noWebpError().

◆ gdImageWebpPtr()

void* gdImageWebpPtr ( gdImagePtr  im,
int size 
)

Definition at line 405 of file gd_webp.c.

References _noWebpError(), and NULL.

◆ gdImageWebpPtrEx()

void* gdImageWebpPtrEx ( gdImagePtr  im,
int size,
int  quantization 
)

Definition at line 411 of file gd_webp.c.

References _noWebpError(), and NULL.

◆ gdImageXbmCtx()

void gdImageXbmCtx ( gdImagePtr  image,
char *  file_name,
int  fg,
gdIOCtx out 
)

Function: gdImageXbmCtx

Writes an image to an IO context in X11 bitmap format.

Parameters:

image - The <gdImagePtr> to write. file_name - The prefix of the XBM's identifiers. Illegal characters are automatically stripped. gd - Which color to use as forground color. All pixels with another color are unset. out - The <gdIOCtx> to write the image file to.

Definition at line 229 of file gd_xbm.c.

References b, c, f, file_name, free, gdCtxPrintf(), gdCtxPuts, gdImageGetPixel(), gdImageSX, gdImageSY, i, isdigit, islower, isupper, cutout::l, name, NULL, out, p, strcasecmp, strdup, strlen(), strrchr, cordic::x, and y.

◆ gdLayerMultiply()

int gdLayerMultiply ( int  dst,
int  src 
)

Function: gdLayerMultiply

Overlay two colors with multiply effect

Parameters: dst - The color to overlay onto. src - The color to overlay.

See also:

  • <gdImageAlphaBlending>
  • <gdAlphaBlend>
  • <gdLayerOverlay>

Definition at line 4166 of file gd.c.

◆ gdLayerOverlay()

int gdLayerOverlay ( int  dst,
int  src 
)

Function: gdLayerOverlay

Overlay two colors

Parameters: dst - The color to overlay onto. src - The color to overlay.

See also:

  • <gdImageAlphaBlending>
  • <gdAlphaBlend>
  • <gdLayerMultiply>

Definition at line 4127 of file gd.c.

◆ gdMajorVersion()

int gdMajorVersion ( void  )

Definition at line 15 of file gd_version.c.

References GD_MAJOR_VERSION.

◆ gdMinorVersion()

int gdMinorVersion ( void  )

Definition at line 23 of file gd_version.c.

References GD_MINOR_VERSION.

◆ gdNewDynamicCtx()

gdIOCtx* gdNewDynamicCtx ( int  size,
void data 
)

◆ gdNewDynamicCtxEx()

◆ gdNewFileCtx()

◆ gdNewSSCtx()

◆ gdReleaseVersion()

int gdReleaseVersion ( void  )

Definition at line 31 of file gd_version.c.

References GD_RELEASE_VERSION.

◆ gdSetErrorMethod()

void gdSetErrorMethod ( gdErrorMethod  error_method)

Definition at line 128 of file gd.c.

◆ gdSupportsFileType()

int gdSupportsFileType ( const char *  filename,
int  writing 
)

Definition at line 149 of file gd_filename.c.

References entry, filename, and ftype().

◆ gdTransformAffineBoundingBox()

int gdTransformAffineBoundingBox ( gdRectPtr  src,
const double  affine[6],
gdRectPtr  bbox 
)

Function: gdTransformAffineBoundingBox Returns the bounding box of an affine transformation applied to a rectangular area <gdRect>

Parameters: src - Rectangular source area for the affine transformation affine - the affine transformation bbox - the resulting bounding box

Returns: GD_TRUE if the affine is rectilinear or GD_FALSE

Definition at line 2175 of file gd_interpolation.c.

References ceil(), extent, GD_FALSE, GD_TRUE, gdAffineApplyToPointF(), i, int(), max, min, and link_confs::src.

◆ gdTransformAffineCopy()

int gdTransformAffineCopy ( gdImagePtr  dst,
int  dst_x,
int  dst_y,
const gdImagePtr  src,
gdRectPtr  src_region,
const double  affine[6] 
)

Function: gdTransformAffineCopy Applies an affine transformation to a region and copy the result in a destination to the given position.

Parameters: dst - Image to draw the transformed image src - Source image dstX - X position in the destination image dstY - Y position in the destination image src_area - Rectangular region to rotate in the src image

Returns: GD_TRUE on success or GD_FALSE on failure

Definition at line 2039 of file gd_interpolation.c.

References abs, bbox, link_confs::dst, floor, GD_BICUBIC, GD_BICUBIC_FIXED, GD_BILINEAR_FIXED, GD_FALSE, GD_NEAREST_NEIGHBOUR, GD_TRUE, gdAffineApplyToPointF(), gdAffineInvert(), gdImageClipRectangle(), gdImageGetClip(), gdImageSetClip(), gdImageSetInterpolationMethod(), gdImageSetPixel(), gdImageSX, gdImageSY, gdTransformAffineBoundingBox(), getPixelInterpolated(), getPixelRgbInterpolated(), gdRect::height, NULL, pt, link_confs::src, gdRect::width, cordic::x, gdPointF::x, gdRect::x, y, gdPointF::y, and gdRect::y.

◆ gdTransformAffineGetImage()

int gdTransformAffineGetImage ( gdImagePtr dst,
const gdImagePtr  src,
gdRectPtr  src_area,
const double  affine[6] 
)

Function: gdTransformAffineGetImage Applies an affine transformation to a region and return an image containing the complete transformation.

Parameters: dst - Pointer to a gdImagePtr to store the created image, NULL when the creation or the transformation failed src - Source image src_area - rectangle defining the source region to transform dstY - Y position in the destination image affine - The desired affine transformation

Returns: GD_TRUE if the affine is rectilinear or GD_FALSE

Definition at line 1927 of file gd_interpolation.c.

References bbox, link_confs::dst, GD_FALSE, GD_TRUE, gdAffineConcat(), gdAffineTranslate(), gdImageAlphaBlending(), gdImageCreateTrueColor(), gdImageDestroy(), gdImagePaletteToTrueColor(), gdImageSX, gdImageSY, gdTransformAffineBoundingBox(), gdTransformAffineCopy(), gdRect::height, m, NULL, res, link_confs::src, gdRect::width, gdRect::x, and gdRect::y.

◆ gdVersionString()

const char* gdVersionString ( void  )

Definition at line 46 of file gd_version.c.

References GD_VERSION_STRING.