Can't show gif in VS && Wrong gif convert on Online Image Converter


What MCU/Processor/Board and compiler are you using?


What LVGL version are you using?

  • @file lv_conf.h
  • Configuration file for v8.3.4

What do you want to achieve?

Show gif. I have success to use lvgl gif example already.

What have you tried so far?

I use Online Image Converter and set Color format:CF_RAW to convert gif to raw data.
But it always convert to LV_IMG_CF_RAW_CHROMA_KEYED.It didn’t show gif.
Besides I saw LV_IMG_CF_RAW_CHROMA_KEYED need custom decoder function.Maybe it need
a decoder.
However I can just find PNG images decoder example,it is different.Can it use for git decoder function?

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

void _demoGif()
    lv_obj_t* screen = lv_scr_act();
    lv_obj_t* gif = lv_gif_create(screen);

    lv_gif_set_src(gif, &ONEPUNCH_gif);

ONEPUNCH_gif .c :
const lv_img_dsc_t ONEPUNCH_gif = { = LV_IMG_CF_RAW_CHROMA_KEYED,
  .header.always_zero = 0,
  .header.reserved = 0,
  .header.w = 400,
  .header.h = 224,
  .data_size = 1381802,
  .data = ONEPUNCH_gif_map,

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.