With this free online image converter tool you can create C arrays or raw binary files from images. Any image format supported by your browser should work (PNG, JPG and BMP files should always work).
The files are intended for use with LVGL but can also be used with other graphics libraries if modified.
The offline version of the converter is available here.
How to use the image converter
- Choose one or more images (png, jpg, or bmp).
- Give a name to the output file (e.g. "wallpaper1").
- Specify the desired color format. Scroll down for details.
- Optionally, enable dithering.
- Click the Convert button to download the resulting C file.
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_img_set_src(img, &my_image_name);