gifquantize.c File Reference

#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  GifColorType
struct  QuantizedColorType
struct  NewColorMapType

Defines

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

Typedefs

typedef unsigned char byte

Functions

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

Variables

static int SortRGBAxis


Define Documentation

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

Definition at line 18 of file gifquantize.c.

#define BITS_PER_PRIM_COLOR   5

Definition at line 25 of file gifquantize.c.

Referenced by GIFquantize(), and SubdivColorMap().

#define COLOR_ARRAY_SIZE   32768

Definition at line 24 of file gifquantize.c.

Referenced by GIFquantize().

#define GIF_ERROR   0

Definition at line 20 of file gifquantize.c.

#define GIF_OK   1

Definition at line 21 of file gifquantize.c.

#define MAX_PRIM_COLOR   0x1f

Definition at line 26 of file gifquantize.c.

Referenced by GIFquantize().


Typedef Documentation

typedef unsigned char byte

Definition at line 13 of file gifquantize.c.


Function Documentation

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.

References ABS, BITS_PER_PRIM_COLOR, GifColorType::Blue, COLOR_ARRAY_SIZE, QuantizedColorType::Count, NewColorMapType::Count, fprintf(), free(), GIF_ERROR, GIF_OK, GifColorType::Green, i, RooFit::Index(), int, j, long, malloc(), MAX_PRIM_COLOR, QuantizedColorType::NewColorIndex, NULL, NewColorMapType::NumEntries, NewColorMapType::QuantizedColors, GifColorType::Red, QuantizedColorType::RGB, NewColorMapType::RGBWidth, and SubdivColorMap().

static int SortCmpRtn ( const void *  Entry1,
const void *  Entry2 
) [static]

Definition at line 297 of file gifquantize.c.

References SortRGBAxis.

Referenced by SubdivColorMap().

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

Definition at line 196 of file gifquantize.c.

References BITS_PER_PRIM_COLOR, NewColorMapType::Count, free(), GIF_ERROR, GIF_OK, i, RooFit::Index(), j, malloc(), NULL, NewColorMapType::NumEntries, NewColorMapType::QuantizedColors, NewColorMapType::RGBMin, NewColorMapType::RGBWidth, SortCmpRtn(), SortRGBAxis, and Sum().

Referenced by GIFquantize().


Variable Documentation

int SortRGBAxis [static]

Definition at line 29 of file gifquantize.c.

Referenced by SortCmpRtn(), and SubdivColorMap().


Generated on Tue Jul 5 15:58:44 2011 for ROOT_528-00b_version by  doxygen 1.5.1