Online Image Converter
Convert BMP, JPG, PNG, or SVG to C array to use them in LVGL.
The image converter for LVGL v8 is available at https://lvgl.io/tools/imageconverter.
For image comression, stride, binary output, and extra color formats check out the Python image converter.
How to use the image converter?
- Choose one or more images
- Give a name to the output file(s) (e.g. "wallpaper1").
- Specify the desired color format.
- Click the Convert button to download the resulting file(s).
How to use the generated file in LVGL
- Copy the resulting C file into your LVGL project
- In a C file of your application declare the image as:
LV_IMG_DECLARE(my_image_name);
- Set the image as the source of an image object:
lv_image_set_src(img, &my_image_name);
- Checkout the Docs for more details.