Several thoughts about image convert and video snapshot

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.


how can I get a bit map data of a PNG image by C code?

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


What LVGL version are you using?


What do you want to achieve?

  1. I want to convert an PNG image from file and convert it to a C array through C code. Like the Online Image Converter, the C array is what I need. more accurately, how to read a PNG image file and generate the RGB lv_img_dsc_t struct member uint8_t* data map。
  2. I want to show the video stream in LVGL , is LVGL support video stream? Or if I received a video stream buffer from video device, the I want to show one frame image through the LVGL, is it can achieved?

What have you tried so far?

I have tried lv_lib_png and use lodepng , but it seems work not so well.

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:

/*You code here*/

Screenshot and/or video

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

This is the intended solution. What was the problem?