GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
gif.h File Reference
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
Include dependency graph for gif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GifPalette
struct  GifBitStatus
struct  GifLzwNode
struct  GifWriter

Macros

#define GIF_TEMP_MALLOC   malloc
#define GIF_TEMP_FREE   free
#define GIF_MALLOC   malloc
#define GIF_FREE   free

Functions

int GifIMax (int l, int r)
int GifIMin (int l, int r)
int GifIAbs (int i)
void GifGetClosestPaletteColor (GifPalette *pPal, int r, int g, int b, int *bestInd, int *bestDiff, int treeRoot)
void GifSwapPixels (uint8_t *image, int pixA, int pixB)
int GifPartition (uint8_t *image, const int left, const int right, const int elt, int pivotIndex)
void GifPartitionByMedian (uint8_t *image, int left, int right, int com, int neededCenter)
void GifSplitPalette (uint8_t *image, int numPixels, int firstElt, int lastElt, int splitElt, int splitDist, int treeNode, bool buildForDither, GifPalette *pal)
int GifPickChangedPixels (const uint8_t *lastFrame, uint8_t *frame, int numPixels)
void GifMakePalette (const uint8_t *lastFrame, const uint8_t *nextFrame, uint32_t width, uint32_t height, int bitDepth, bool buildForDither, GifPalette *pPal)
void GifDitherImage (const uint8_t *lastFrame, const uint8_t *nextFrame, uint8_t *outFrame, uint32_t width, uint32_t height, GifPalette *pPal)
void GifThresholdImage (const uint8_t *lastFrame, const uint8_t *nextFrame, uint8_t *outFrame, uint32_t width, uint32_t height, GifPalette *pPal)
void GifWriteBit (GifBitStatus *stat, uint32_t bit)
void GifWriteChunk (FILE *f, GifBitStatus *stat)
void GifWriteCode (FILE *f, GifBitStatus *stat, uint32_t code, uint32_t length)
void GifWritePalette (const GifPalette *pPal, FILE *f)
void GifWriteLzwImage (FILE *f, uint8_t *image, uint32_t left, uint32_t top, uint32_t width, uint32_t height, uint32_t delay, GifPalette *pPal)
bool GifBegin (GifWriter *writer, const char *filename, uint32_t width, uint32_t height, uint32_t delay, int32_t bitDepth=8, bool dither=false)
bool GifWriteFrame (GifWriter *writer, const uint8_t *image, uint32_t width, uint32_t height, uint32_t delay, int bitDepth=8, bool dither=false)
bool GifEnd (GifWriter *writer)

Variables

const int kGifTransIndex = 0

Macro Definition Documentation

◆ GIF_FREE

#define GIF_FREE   free

◆ GIF_MALLOC

#define GIF_MALLOC   malloc

◆ GIF_TEMP_FREE

#define GIF_TEMP_FREE   free

◆ GIF_TEMP_MALLOC

#define GIF_TEMP_MALLOC   malloc

Function Documentation

◆ GifBegin()

bool GifBegin ( GifWriter * writer,
const char * filename,
uint32_t width,
uint32_t height,
uint32_t delay,
int32_t bitDepth = 8,
bool dither = false )
Here is the caller graph for this function:

◆ GifDitherImage()

void GifDitherImage ( const uint8_t * lastFrame,
const uint8_t * nextFrame,
uint8_t * outFrame,
uint32_t width,
uint32_t height,
GifPalette * pPal )
Here is the caller graph for this function:

◆ GifEnd()

bool GifEnd ( GifWriter * writer)
Here is the caller graph for this function:

◆ GifGetClosestPaletteColor()

void GifGetClosestPaletteColor ( GifPalette * pPal,
int r,
int g,
int b,
int * bestInd,
int * bestDiff,
int treeRoot )
Here is the caller graph for this function:

◆ GifIAbs()

int GifIAbs ( int i)
Here is the caller graph for this function:

◆ GifIMax()

int GifIMax ( int l,
int r )
Here is the caller graph for this function:

◆ GifIMin()

int GifIMin ( int l,
int r )
Here is the caller graph for this function:

◆ GifMakePalette()

void GifMakePalette ( const uint8_t * lastFrame,
const uint8_t * nextFrame,
uint32_t width,
uint32_t height,
int bitDepth,
bool buildForDither,
GifPalette * pPal )
Here is the caller graph for this function:

◆ GifPartition()

int GifPartition ( uint8_t * image,
const int left,
const int right,
const int elt,
int pivotIndex )
Here is the caller graph for this function:

◆ GifPartitionByMedian()

void GifPartitionByMedian ( uint8_t * image,
int left,
int right,
int com,
int neededCenter )
Here is the caller graph for this function:

◆ GifPickChangedPixels()

int GifPickChangedPixels ( const uint8_t * lastFrame,
uint8_t * frame,
int numPixels )
Here is the caller graph for this function:

◆ GifSplitPalette()

void GifSplitPalette ( uint8_t * image,
int numPixels,
int firstElt,
int lastElt,
int splitElt,
int splitDist,
int treeNode,
bool buildForDither,
GifPalette * pal )
Here is the caller graph for this function:

◆ GifSwapPixels()

void GifSwapPixels ( uint8_t * image,
int pixA,
int pixB )
Here is the caller graph for this function:

◆ GifThresholdImage()

void GifThresholdImage ( const uint8_t * lastFrame,
const uint8_t * nextFrame,
uint8_t * outFrame,
uint32_t width,
uint32_t height,
GifPalette * pPal )
Here is the caller graph for this function:

◆ GifWriteBit()

void GifWriteBit ( GifBitStatus * stat,
uint32_t bit )
Here is the caller graph for this function:

◆ GifWriteChunk()

void GifWriteChunk ( FILE * f,
GifBitStatus * stat )
Here is the caller graph for this function:

◆ GifWriteCode()

void GifWriteCode ( FILE * f,
GifBitStatus * stat,
uint32_t code,
uint32_t length )
Here is the caller graph for this function:

◆ GifWriteFrame()

bool GifWriteFrame ( GifWriter * writer,
const uint8_t * image,
uint32_t width,
uint32_t height,
uint32_t delay,
int bitDepth = 8,
bool dither = false )
Here is the caller graph for this function:

◆ GifWriteLzwImage()

void GifWriteLzwImage ( FILE * f,
uint8_t * image,
uint32_t left,
uint32_t top,
uint32_t width,
uint32_t height,
uint32_t delay,
GifPalette * pPal )
Here is the caller graph for this function:

◆ GifWritePalette()

void GifWritePalette ( const GifPalette * pPal,
FILE * f )
Here is the caller graph for this function:

Variable Documentation

◆ kGifTransIndex

const int kGifTransIndex = 0