gamut.codecs.msf_gif

Undocumented in source.

Members

Aliases

MsfGifFileWriteFunc
alias MsfGifFileWriteFunc = size_t function(const(void)* buffer, size_t size, size_t count, void* stream)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Functions

MSF_GIF_FREE
void MSF_GIF_FREE(void* contextPointer, void* oldMemory, size_t oldSize)
Undocumented in source. Be warned that the author may not have intended to support it.
MSF_GIF_MALLOC
void* MSF_GIF_MALLOC(void* contextPointer, size_t newSize)
Undocumented in source. Be warned that the author may not have intended to support it.
MSF_GIF_REALLOC
void* MSF_GIF_REALLOC(void* contextPointer, void* oldMemory, size_t oldSize, size_t newSize)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_bit_log
int msf_bit_log(int i)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_compress_frame
MsfGifBuffer* msf_compress_frame(void* allocContext, int width, int height, int centiSeconds, MsfCookedFrame frame, MsfGifState* handle, uint8_t* used, int16_t* lzwMem)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_cook_frame
void msf_cook_frame(MsfCookedFrame* frame, const(uint8_t)* raw, uint8_t* used, int width, int height, int pitch, int depth, int msf_gif_alpha_threshold)
Undocumented in source. Be warned that the author may not have intended to support it.
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_end
MsfGifResult msf_gif_end(MsfGifState* handle)
Undocumented in source. Be warned that the author may not have intended to support it.
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_gif_free
void msf_gif_free(MsfGifResult result)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_imax
int msf_imax(int a, int b)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_imin
int msf_imin(int a, int b)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_lzw_reset
void msf_lzw_reset(MsfStridedList* lzw, int tableSize, int stride)
Undocumented in source. Be warned that the author may not have intended to support it.
msf_put_code
void msf_put_code(uint8_t** writeHead, uint32_t* blockBits, int len, uint32_t code)

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

Static functions

msf_free_gif_state
void msf_free_gif_state(MsfGifState* handle)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

MsfCookedFrame
struct MsfCookedFrame
Undocumented in source.
MsfGifBuffer
struct MsfGifBuffer
Undocumented in source.
MsfGifResult
struct MsfGifResult

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

MsfGifState
struct MsfGifState
Undocumented in source.
MsfStridedList
struct MsfStridedList
Undocumented in source.

Variables

lzwAllocSize
enum int lzwAllocSize;

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

msf_gif_bgra_flag
enum int msf_gif_bgra_flag;

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

Meta