basics image decoder interface impemented (wip)

This commit is contained in:
Gabor Kiss-Vamosi
2018-08-08 09:50:01 +02:00
parent 8105bced11
commit e7f55612b0
7 changed files with 373 additions and 230 deletions

View File

@@ -38,36 +38,6 @@ extern "C" {
* TYPEDEFS
**********************/
/* Image header it is compatible with
* the result image converter utility*/
typedef struct
{
union {
struct {
uint32_t chroma_keyed:1; /*1: The image contains transparent pixels with LV_COLOR_TRANSP color*/
uint32_t alpha_byte :1; /*Every pixel is extended with a 8 bit alpha channel*/
uint32_t format :6; /*See: lv_img_px_format*/
uint32_t w:12; /*Width of the image map*/
uint32_t h:12; /*Height of the image map*/
} header;
uint8_t src_type;
};
union {
const uint8_t * pixel_map; /*For internal images (c arrays) pointer to the pixels array*/
uint8_t first_pixel; /*For external images (binary) the first byte of the pixels (just for convenient)*/
};
} lv_img_t;
typedef enum {
LV_IMG_FORMAT_UNKOWN = 0,
LV_IMG_FORMAT_INTERNAL_RAW, /*'lv_img_t' variable compiled with the code*/
LV_IMG_FORMAT_FILE_RAW_RGB332, /*8 bit*/
LV_IMG_FORMAT_FILE_RAW_RGB565, /*16 bit*/
LV_IMG_FORMAT_FILE_RAW_RGB888, /*24 bit (stored on 32 bit)*/
} lv_img_format_t;
typedef enum {
LV_IMG_SRC_VARIABLE,
LV_IMG_SRC_FILE,