lv_image_buf.h
Defines
-
LV_IMAGE_BUF_SIZE_TRUE_COLOR(w, h)
-
LV_IMAGE_BUF_SIZE_TRUE_COLOR_CHROMA_KEYED(w, h)
-
LV_IMAGE_BUF_SIZE_TRUE_COLOR_ALPHA(w, h)
-
LV_IMAGE_BUF_SIZE_ALPHA_1BIT(w, h)
-
LV_IMAGE_BUF_SIZE_ALPHA_2BIT(w, h)
-
LV_IMAGE_BUF_SIZE_ALPHA_4BIT(w, h)
-
LV_IMAGE_BUF_SIZE_ALPHA_8BIT(w, h)
-
LV_IMAGE_BUF_SIZE_INDEXED_1BIT(w, h)
-
LV_IMAGE_BUF_SIZE_INDEXED_2BIT(w, h)
-
LV_IMAGE_BUF_SIZE_INDEXED_4BIT(w, h)
-
LV_IMAGE_BUF_SIZE_INDEXED_8BIT(w, h)
-
_LV_ZOOM_INV_UPSCALE
Functions
-
void lv_image_buf_set_palette(lv_image_dsc_t *dsc, uint8_t id, lv_color32_t c)
Set the palette color of an indexed image. Valid only for
LV_IMAGE_CF_INDEXED1/2/4/8
- Parameters:
dsc -- pointer to an image descriptor
id -- the palette color to set:
for
LV_IMAGE_CF_INDEXED1
: 0..1for
LV_IMAGE_CF_INDEXED2
: 0..3for
LV_IMAGE_CF_INDEXED4
: 0..15for
LV_IMAGE_CF_INDEXED8
: 0..255
c -- the color to set in lv_color32_t format
-
void lv_image_buf_free(lv_image_dsc_t *dsc)
Free an allocated image buffer
- Parameters:
dsc -- image buffer to free
-
void _lv_image_buf_get_transformed_area(lv_area_t *res, lv_coord_t w, lv_coord_t h, lv_coord_t angle, uint16_t zoom_x, uint16_t zoom_y, const lv_point_t *pivot)
Get the area of a rectangle if its rotated and scaled
- Parameters:
res -- store the coordinates here
w -- width of the rectangle to transform
h -- height of the rectangle to transform
angle -- angle of rotation
zoom -- zoom, (256 no zoom)
pivot -- x,y pivot coordinates of rotation
-
struct lv_image_header_t
- #include <lv_image_buf.h>
The first 8 bit is very important to distinguish the different source types. For more info see
lv_image_get_src_type()
in lv_img.c On big endian systems the order is reversed so cf and always_zero must be at the end of the struct.
-
struct lv_image_dsc_t
- #include <lv_image_buf.h>
Image header it is compatible with the result from image converter utility
Public Members
-
lv_image_header_t header
A header describing the basics of the image
-
uint32_t data_size
Size of the image in bytes
-
const uint8_t *data
Pointer to the data of the image
-
lv_image_header_t header