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

  1. Choose one or more images (png, jpg, or bmp).
  2. Give a name to the output file (e.g. "wallpaper1").
  3. Specify the desired color format. Scroll down for details.
  4. Optionally, enable dithering.
  5. Click the Convert button to download the resulting C file.

How to use the generated file in LVGL

  1. Copy the resulting C file into your LVGL project
  2. In a C file of your application declare the image as: LV_IMG_DECLARE(my_image_name);
  3. Set the image as the source of an image object: lv_img_set_src(img, &my_image_name);