Online Image Converter
BMP, JPG or PNG to C array or binary

LVGL can use images from C arrays (compiled with the code) or from external devices (e.g. from SD card) to display them on your TFT display. Learn how to create images for the graphics library.

shape image

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);

Alpha byte Add a 8 bit Alpha value to every pixel
Chroma keyed Make LV_COLOR_TRANSP (lv_conf.h) pixels to transparent


Subscribe to Newsletters

Subscribe to our newsletter to not miss any news about LVGL. We will send maximum of 2 mails per month.

Contact us

Do you have a question? Have a great idea? Want to leave feedback?

We are looking forward to hearing from you. Just fill in the form to contact us.

Reach us quickly