Elaztek Developer Hub
Blamite Game Engine - blam!  00423.10.27.24.0533.blamite
The core library for the Blamite Game Engine.
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:

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 pivotValue)
 
void GifPartitionByMedian (uint8_t *image, int left, int right, int com, int neededCenter)
 
int GifPartitionByMean (uint8_t *image, int left, int right, int com, int neededMean)
 
void GifSplitPalette (uint8_t *image, int numPixels, int treeNode, int treeLevel, 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 
)

◆ 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 call graph for this function:
+ Here is the caller graph for this function:

◆ GifEnd()

bool GifEnd ( GifWriter writer)

◆ GifGetClosestPaletteColor()

void GifGetClosestPaletteColor ( GifPalette pPal,
int  r,
int  g,
int  b,
int *  bestInd,
int *  bestDiff,
int  treeRoot 
)
+ Here is the call graph for this function:
+ 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 call graph for this function:
+ Here is the caller graph for this function:

◆ GifPartition()

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

◆ GifPartitionByMean()

int GifPartitionByMean ( uint8_t image,
int  left,
int  right,
int  com,
int  neededMean 
)
+ Here is the call graph for this function:
+ 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 call graph for this function:
+ 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  treeNode,
int  treeLevel,
bool  buildForDither,
GifPalette pal 
)
+ Here is the call graph for this function:
+ 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 call graph for this function:
+ 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 call graph for this function:
+ 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 call 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 call graph for this function:
+ 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