11.3. PNG decode

11.3.1. Overview

PNG decoding example project demonstrates how to decode a PNG file using LODEPNG software PNG library.

11.3.2. Board Setting

  • Connect the USB disk to the development board usb0, or insert the SD memory card into the development board SD card

  • Connect LCD screen to development board

11.3.3. Configuration

  • File CMakeLists.txt.

    • set (PNG_USE_SDCARD 1) to read png file (.png) from SD card or set (PNG_USE_UDISK 1) to read png file (.png) from u-disk. These options are exclusive.

11.3.4. Supported picture formats

  • Supports standard PNG images

11.3.5. Image size supported by this routine

  • png file size is expected to be less than 1MB

11.3.6. Running the example

  • Configure storage in CMakeLists.txt, default is PNG_USE_SDCARD.

  • Put png files (with .png) into target storage

  • Connect LCD pannel and storage to board

  • Power on the board

  • Download built elf into development board and run the demo

  • If everything goes well, jpeg files stored in the target storage will be show on LCD pannel one by one.