MPLAB® Harmony Graphics Suite > Graphics Library > Legato Graphics Library > Legato Interface > e) Image Functions > leImage_Allocate Function
MPLAB® Harmony Graphics Suite
leImage_Allocate Function

Dynamically allocates an image buffer in local memory using the given parameters. This uses the library's internal allocator and memory pools.

C
LIB_EXPORT leImage* leImage_Allocate(
    uint32_t width, 
    uint32_t height, 
    leColorMode mode
);
Parameters
Parameters 
Description 
uint32_t width 
the width of the image in pixels 
uint32_t height 
the height of the image in pixels 
leColorMode mode 
the color mode of the image 
Returns

leImage* - a valid image or null if there wasn't enough memory for the allocation

MPLAB® Harmony Graphics Suite