lv_gif.h

API reference for lv_gif.h

Report on GitHub

Functions

lv_gif_set_color_format

Set the color format of the internally allocated framebuffer that the gif will be decoded to. The default is LV_COLOR_FORMAT_ARGB8888. Call this before lv_gif_set_src to avoid reallocating the framebuffer.

 
void lv_gif_set_color_format(lv_obj_t *obj, lv_color_format_t color_format)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a gif object
color_formatlv_color_format_tthe color format of the gif framebuffer

lv_gif_set_src

Set the gif data to display on the object

 
void lv_gif_set_src(lv_obj_t *obj, const void *src)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a gif object
srcconst void *1) pointer to an lv_image_dsc_t descriptor (which contains gif raw data) or 2) path to a gif file (e.g. "S:/dir/anim.gif")

lv_gif_set_loop_count

Set the loop count for the GIF.

 
void lv_gif_set_loop_count(lv_obj_t *obj, int32_t count)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a gif obj
countint32_tthe loop count to set

lv_gif_set_auto_pause_invisible

Set whether to decode invisible object.

 
void lv_gif_set_auto_pause_invisible(lv_obj_t *obj, bool auto_pause)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a gif object
auto_pausebooltrue: auto pause when invisible, false: don't auto pause

Variables

lv_gif_class

 
const lv_obj_class_t lv_gif_class

Dependencies

How is this guide?

Last updated on

On this page