GIF (lv_gif)

Plays animated GIF images using LVGL's built-in decoder.

Overview

The GIF widget plays animated GIF images using LVGL's built-in AnimatedGIF decoder. The source can be an embedded array or a file.

Learn more in the LVGL Open documentation.

lv_example_gif.c

Enumerations

lv_color_format — Color format of the buffer the gif is decoded to

ValueDescription
rgb56516 bit RGB
rgb565_swapped16 bit RGB with swapped bytes
rgb88824 bit RGB
xrgb888832 bit RGB, the alpha byte is unused
argb888832 bit RGB with alpha

Properties

Parts

Style parts of the widget with local style (e.g. style_bg_color-knob="0xff0000") or with style sheets (e.g. <style name="style_knob" selector="knob">). See Styles to learn more.

PartDescription
mainStyle the GIF: image_recolor, image_recolor_opa and image_opa. Background, border, etc can be added too.

Properties below are the widget's XML <api>; see API for how properties, parameters and elements work.

PropertyTypeDescription
srcimageThe source for the gif (raw data or a file)
loop_countintNumber of repeats. If not set the information form the gif will be used
color_formatenum:lv_color_formatColor format to decode the gif to. Set it before src to decode only once
auto_pause_invisibleboolPause the gif while it is not visible

Last updated on

On this page