Enum in ldk_image.h

LDKImageFormat

typedef enum LDKImageFormat{
  LDK_IMAGE_FORMAT_RGBA8_UNORM=0,
  LDK_IMAGE_FORMAT_RGBA16_UNORM
}LDKImageFormat;
Function in ldk_image.h

ldk_image_create_format

Create an image from raw interleaved RGBA pixels in the requested format.

LDK_API LDKImage * ldk_image_create_format(
 u32 width,
 u32 height,
 LDKImageFormat format,
 void const *pixels
);

Parameters

u32 width
Width in pixels or the units expected by the API.
u32 height
Height in pixels or the units expected by the API.
LDKImageFormat format
Format to use for this resource.
void const *pixels
Image pixel data.

Returns

Pointer to the requested object or data; NULL when unavailable.

Function in ldk_image.h

ldk_image_get_pixels

Get the image pixel buffer.

LDK_API u8 const * ldk_image_get_pixels(LDKImage const *image);

Parameters

LDKImage const *image
Image used by this operation.

Returns

Pointer to the requested object or data; NULL when unavailable.