AnimaEngine  1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
Functions
gif_writer.h File Reference

GIF compilation engine utilizing LZW encoding. More...

#include "common.h"
#include "ppm.h"

Go to the source code of this file.

Functions

int Gif_WriteIndexed (const char *path, const u8 *frames, int frame_count, int width, int height, const RgbaColor *palette, int palette_count, int transparent_index, int delay_cs, int loop_count, int scale)
 Encodes and writes a sequence of indexed frames to a GIF file. More...
 

Detailed Description

GIF compilation engine utilizing LZW encoding.

Function Documentation

◆ Gif_WriteIndexed()

int Gif_WriteIndexed ( const char *  path,
const u8 frames,
int  frame_count,
int  width,
int  height,
const RgbaColor palette,
int  palette_count,
int  transparent_index,
int  delay_cs,
int  loop_count,
int  scale 
)

Encodes and writes a sequence of indexed frames to a GIF file.

Parameters
pathPath to write the final GIF file.
framesPointer to 8-bit indexed frame pixel buffer. Size: (width * height * frame_count).
frame_countTotal number of frames in sequence.
widthCanvas width in pixels.
heightCanvas height in pixels.
palettePointer to an array of colors defining the color map (palette).
palette_countTotal number of entries in color palette (up to 256).
transparent_indexIndex in the palette mapping transparency, or -1.
delay_csBase duration between frames in centiseconds (1/100ths of a second).
loop_countNumber of loops (0 = infinite).
scaleBilinear scale multiplier applied to output image sizes.
Returns
0 on success; negative value on file or encoding failure.