The OpenD Programming Language

gamut.codecs.msf_gif

Undocumented in source.

Members

Functions

msf_gif_begin
int msf_gif_begin(MsfGifState* handle, int width, int height)

@param width Image width in pixels. @param height Image height in pixels. @return Non-zero on success, 0 on error.

msf_gif_end
MsfGifResult msf_gif_end(MsfGifState* handle)

@return A block of memory containing the gif file data, or NULL on error. You are responsible for freeing this via msf_gif_free().

msf_gif_frame
int msf_gif_frame(MsfGifState* handle, const(uint8_t)* pixelData, int centiSecondsPerFame, int maxBitDepth, int pitchInBytes)

@param pixelData Pointer to raw framebuffer data. Rows must be contiguous in memory, in RGBA8 format (or BGRA8 if you have set msf_gif_bgra_flag = true). Note: This function does NOT free pixelData. You must free it yourself afterwards. @param centiSecondsPerFrame How many hundredths of a second this frame should be displayed for. Note: This being specified in centiseconds is a limitation of the GIF format. @param maxBitDepth Limits how many bits per pixel can be used when quantizing the gif. The actual bit depth chosen for a given frame will be less than or equal to the supplied maximum, depending on the variety of colors used in the frame. maxBitDepth will be clamped between 1 and 16. The recommended default is 16. Lowering this value can result in faster exports and smaller gifs, but the quality may suffer. Please experiment with this value to find what works best for your application. @param pitchInBytes The number of bytes from the beginning of one row of pixels to the beginning of the next. If you want to flip the image, just pass in a negative pitch. @return Non-zero on success, 0 on error.

msf_gif_free
void msf_gif_free(MsfGifResult result)

@param result The MsfGifResult struct, verbatim as it was returned from msf_gif_end().

msf_put_code
void msf_put_code(uint8_t** writeHead, uint32_t* blockBits, int len, uint32_t code)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Frame Compression /// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Structs

MsfGifResult
struct MsfGifResult

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// HEADER /// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Variables

lzwAllocSize
enum int lzwAllocSize;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// To-memory API /// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

msf_gif_bgra_flag
enum int msf_gif_bgra_flag;

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Frame Cooking /// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Meta