First commit with working display

This commit is contained in:
Ricardo LAP
2026-09-13 20:50:51 +00:00
parent a83af259b3
commit c54c68c899
6690 changed files with 1093387 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
.. example_heading: LibWebP
Open a WEBP image from file and variable
----------------------------------------
.. lv_example:: libs/libwebp/lv_example_libwebp_1
:language: c

View File

@@ -0,0 +1,38 @@
/**
* @file lv_example_libwebp.h
*
*/
#ifndef LV_EXAMPLE_LIBWEBP_H
#define LV_EXAMPLE_LIBWEBP_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_example_libwebp_1(void);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /*extern "C"*/
#endif
#endif /*LV_EXAMPLE_LIBWEBP_H*/

View File

@@ -0,0 +1,31 @@
#include "../../lv_examples.h"
#if LV_BUILD_EXAMPLES
#if LV_USE_LIBWEBP
/**
* Load a WEBP image
*/
void lv_example_libwebp_1(void)
{
lv_obj_t * img;
img = lv_image_create(lv_screen_active());
/* Assuming a File system is attached to letter 'A'
* E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */
lv_image_set_src(img, "A:lvgl/examples/libs/libwebp/rose.webp");
lv_obj_center(img);
}
#else
void lv_example_libwebp_1(void)
{
lv_obj_t * label = lv_label_create(lv_screen_active());
lv_label_set_text(label, "Libwebp is not installed");
lv_obj_center(label);
}
#endif
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB