# libpng (/examples/libs/libpng)



Reference PNG decoder implementation. Enable with `LV_USE_LIBPNG` in `lv_conf.h`.

PNG from array and file with libpng [#png-from-array-and-file-with-libpng]

<LvglExampleBrief>
  Show the same PNG decoded from an embedded array and from a file path.
</LvglExampleBrief>

Two image widgets are created on the active screen. The left one binds
to the `img_png_demo` descriptor declared with `LV_IMAGE_DECLARE`, and
the right one reads `A:lvgl/examples/libs/libpng/png_demo.png` through
the filesystem driver registered under drive letter `A`. Both routes
go through the libpng image decoder.

<LvglExample name="lv_example_libpng_1" path="libs/libpng/lv_example_libpng_1" />
