With this free online image converter tool you can create C arrays or raw binary files from images. PNG, JPG and BMP files are supported. To handle trasparency you can add an alpha byte for every pixel or mark the image as chroma keyed.

The image converter is designed to be compitible with LittlevGL but with minor modification you can make it compatible with other graphics libraries.

How to use the image converter?

  1. Choose an image (png, jpg, or bmp)
  2. Give a name to the output file. E.g. "wallpaper1"
  3. Specify the trasparency type
    • None: just convert the image as it is
    • Alpha byte: add alpha byte to every pixel to handle pixel level opacity
    • Chroma keyed: pixels with LV_COLOR_TRANSP (lv_conf.h) will be transparent
  4. Set the output format: C array, Binary RGB332, Binary RGB565, Binary RGB888
  5. Click the Convert button and result file will start to download.

How to use the generated file in LittlevGL?

  • For C arrays
    1. Copy the result C file into your LittlevGL project
    2. In a C file of your application declare the image as: extern const lv_img_t my_image_name; or LV_IMG_DECLARE(my_image_name);
    3. Set the image for an lv_img object: lv_img_set_src(img1, &my_image_name);
  • For externally binary files (e.g. SD card)
    1. Set up a new driver. To learn more read the Tutorial.
    2. Set the image for an lv_img object: lv_img_set_src(img1, "S:/path/to/image");

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


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

LittlevGL - Open-source Embedded GUI Library

LittlevGL is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.

If you like LittlevGL, please
support its deveopment!


The founder of Littlev Graphics Library (LittlevGL) and related software modules is:
Gábor Kiss-Vámosi
All Rights Reserved ©  2018 Hungary