libnsgif
|
#include <stdbool.h>
#include <inttypes.h>
Go to the source code of this file.
Data Structures | |
struct | gif_frame |
struct | gif_bitmap_callback_vt |
struct | gif_animation |
Typedefs | |
typedef struct gif_frame | gif_frame |
typedef void *(* | gif_bitmap_cb_create )(int width, int height) |
typedef void(* | gif_bitmap_cb_destroy )(void *bitmap) |
typedef unsigned char *(* | gif_bitmap_cb_get_buffer )(void *bitmap) |
typedef void(* | gif_bitmap_cb_set_opaque )(void *bitmap, bool opaque) |
typedef bool(* | gif_bitmap_cb_test_opaque )(void *bitmap) |
typedef void(* | gif_bitmap_cb_modified )(void *bitmap) |
typedef struct gif_bitmap_callback_vt | gif_bitmap_callback_vt |
typedef struct gif_animation | gif_animation |
Enumerations | |
enum | gif_result { GIF_WORKING = 1, GIF_OK = 0, GIF_INSUFFICIENT_FRAME_DATA = -1, GIF_FRAME_DATA_ERROR = -2, GIF_INSUFFICIENT_DATA = -3, GIF_DATA_ERROR = -4, GIF_INSUFFICIENT_MEMORY = -5, GIF_FRAME_NO_DISPLAY = -6, GIF_END_OF_FRAME = -7 } |
Functions | |
void | gif_create (gif_animation *gif, gif_bitmap_callback_vt *bitmap_callbacks) |
gif_result | gif_initialise (gif_animation *gif, size_t size, unsigned char *data) |
gif_result | gif_decode_frame (gif_animation *gif, unsigned int frame) |
void | gif_finalise (gif_animation *gif) |
Interface to progressive animated GIF file decoding.
typedef struct gif_animation gif_animation |
GIF animation data
typedef struct gif_bitmap_callback_vt gif_bitmap_callback_vt |
Bitmap callbacks function table
typedef void*(* gif_bitmap_cb_create)(int width, int height) |
typedef void(* gif_bitmap_cb_destroy)(void *bitmap) |
typedef unsigned char*(* gif_bitmap_cb_get_buffer)(void *bitmap) |
typedef void(* gif_bitmap_cb_modified)(void *bitmap) |
typedef void(* gif_bitmap_cb_set_opaque)(void *bitmap, bool opaque) |
typedef bool(* gif_bitmap_cb_test_opaque)(void *bitmap) |
enum gif_result |
void gif_create | ( | gif_animation * | gif, |
gif_bitmap_callback_vt * | bitmap_callbacks | ||
) |
Initialises necessary gif_animation members.
gif_result gif_decode_frame | ( | gif_animation * | gif, |
unsigned int | frame | ||
) |
Decodes a GIF frame.
void gif_finalise | ( | gif_animation * | gif | ) |
Releases any workspace held by a gif
gif_result gif_initialise | ( | gif_animation * | gif, |
size_t | size, | ||
unsigned char * | data | ||
) |
Initialises any workspace held by the animation and attempts to decode any information that hasn't already been decoded. If an error occurs, all previously decoded frames are retained.