Logo ROOT   6.16/01
Reference Guide
Macros | Typedefs | Functions | Variables
gifquantize.c File Reference
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for gifquantize.c:

Macros

#define ABS(x)   ((x) > 0 ? (x) : (-(x)))
 
#define BITS_PER_PRIM_COLOR   5
 
#define COLOR_ARRAY_SIZE   32768
 
#define GIF_ERROR   0
 
#define GIF_OK   1
 
#define MAX_PRIM_COLOR   0x1f
 

Typedefs

typedef unsigned char byte
 
typedef struct GifColorType GifColorType
 
typedef struct NewColorMapType NewColorMapType
 
typedef struct QuantizedColorType QuantizedColorType
 

Functions

int GIFquantize (unsigned int Width, unsigned int Height, int *ColorMapSize, byte *RedInput, byte *GreenInput, byte *BlueInput, byte *OutputBuffer, GifColorType *OutputColorMap)
 
static int SortCmpRtn (const void *Entry1, const void *Entry2)
 
static int SubdivColorMap (NewColorMapType *NewColorSubdiv, unsigned int ColorMapSize, unsigned int *NewColorMapSize)
 

Variables

static int SortRGBAxis
 

Macro Definition Documentation

◆ ABS

#define ABS (   x)    ((x) > 0 ? (x) : (-(x)))

Definition at line 18 of file gifquantize.c.

◆ BITS_PER_PRIM_COLOR

#define BITS_PER_PRIM_COLOR   5

Definition at line 25 of file gifquantize.c.

◆ COLOR_ARRAY_SIZE

#define COLOR_ARRAY_SIZE   32768

Definition at line 24 of file gifquantize.c.

◆ GIF_ERROR

#define GIF_ERROR   0

Definition at line 20 of file gifquantize.c.

◆ GIF_OK

#define GIF_OK   1

Definition at line 21 of file gifquantize.c.

◆ MAX_PRIM_COLOR

#define MAX_PRIM_COLOR   0x1f

Definition at line 26 of file gifquantize.c.

Typedef Documentation

◆ byte

typedef unsigned char byte

Definition at line 13 of file gifquantize.c.

◆ GifColorType

typedef struct GifColorType GifColorType

◆ NewColorMapType

typedef struct NewColorMapType NewColorMapType

◆ QuantizedColorType

typedef struct QuantizedColorType QuantizedColorType

Function Documentation

◆ GIFquantize()

int GIFquantize ( unsigned int  Width,
unsigned int  Height,
int *  ColorMapSize,
byte RedInput,
byte GreenInput,
byte BlueInput,
byte OutputBuffer,
GifColorType OutputColorMap 
)

Definition at line 63 of file gifquantize.c.

◆ SortCmpRtn()

static int SortCmpRtn ( const void Entry1,
const void Entry2 
)
static

Definition at line 298 of file gifquantize.c.

◆ SubdivColorMap()

static int SubdivColorMap ( NewColorMapType NewColorSubdiv,
unsigned int  ColorMapSize,
unsigned int *  NewColorMapSize 
)
static

Definition at line 196 of file gifquantize.c.

Variable Documentation

◆ SortRGBAxis

int SortRGBAxis
static

Definition at line 29 of file gifquantize.c.