LDKImage
typedef struct LDKImage LDKImage;
typedef struct LDKImage LDKImage;
typedef struct LDKImageInfo{
u32 width;
u32 height;
u32 channel_count;
u32 bytes_per_channel;
LDKImageFormat format;
u64 byte_count;
u8 const *pixels;
}LDKImageInfo;
Create an RGBA8 UNORM image.
LDK_API LDKImage * ldk_image_create(
u32 width,
u32 height,
void const *pixels
);
u32 widthu32 heightvoid const *pixelsPointer to the requested object or data; NULL when unavailable.
Create an image from pixel data in memory.
LDK_API LDKImage * ldk_image_create_from_memory(
void const *data,
u32 data_size
);
void const *datau32 data_sizePointer to the requested object or data; NULL when unavailable.
Destroy the image.
LDK_API void ldk_image_destroy(LDKImage *image);
LDKImage *imageGet the size of the image pixel buffer in bytes.
LDK_API u64 ldk_image_get_byte_count(LDKImage const *image);
LDKImage const *imageNumber of matching entries.
Query the number of bytes used per image channel.
LDK_API u32 ldk_image_get_bytes_per_channel(LDKImage const *image);
LDKImage const *imageThe resulting numeric value.
Get the number of color channels in the image format.
LDK_API u32 ldk_image_get_channel_count(LDKImage const *image);
LDKImage const *imageNumber of matching entries.
Read the image height in pixels.
LDK_API u32 ldk_image_get_height(LDKImage const *image);
LDKImage const *imageThe resulting numeric value.
Read the image format and dimension metadata.
LDK_API bool ldk_image_get_info(
LDKImage const *image,
LDKImageInfo *out_info
);
LDKImage const *imageLDKImageInfo *out_infoTrue if the operation succeeds; false otherwise.
Read the image width in pixels.
LDK_API u32 ldk_image_get_width(LDKImage const *image);
LDKImage const *imageThe resulting numeric value.