https://github.com/lvgl/lv_lib_gif
GIF library for LVGL
https://github.com/lvgl/lv_lib_gif
embedded gif-decoder lvgl
Last synced: 22 days ago
JSON representation
GIF library for LVGL
- Host: GitHub
- URL: https://github.com/lvgl/lv_lib_gif
- Owner: lvgl
- License: mit
- Created: 2020-07-23T08:33:06.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-17T17:19:10.000Z (about 3 years ago)
- Last Synced: 2025-03-21T05:43:02.159Z (about 1 month ago)
- Topics: embedded, gif-decoder, lvgl
- Language: C
- Size: 139 KB
- Stars: 37
- Watchers: 5
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GIF decoder for LVGL
**This repository is merged into the lvgl repository. See https://docs.lvgl.io/master/libs/gif.html**
Allow to use of GIF images in LVGL from.
Based on https://github.com/lecram/gifdec
## Get started
- Download or clone this repository
- [Download from GitHub](https://github.com/lvgl/lv_lib_gif/archive/master.zip)
- Clone: `git clone https://github.com/lvgl/lv_lib_gif.git`
- Include the library: `#include "lv_lib_gif/lv_gif.h"`## Use GIF images from file
```c
lv_obj_t * img = lv_gif_create_from_file(parent, "S/path/to/example.gif");
```## Use GIF images from flash
If the gif file stored in the flash as a C array:
```c
extern const uint8_t example_gif_map[]; /*Use the example gif*/
lv_obj_t * img = lv_gif_create_from_data(parent, example_gif_map);
```
### Convert GIF files to C array
To convert a GIF file to byte values array use [LVGL's online converter](https://lvgl.io/tools/imageconverter). Select "Raw" color format and "C array" Output format.