wx_human_seg 3.0.0
wx_image_c_api.h
Go to the documentation of this file.
1
6#ifndef WX_IMAGE_C_API_H_
7#define WX_IMAGE_C_API_H_
8
9#include <stdint.h>
10#include <stddef.h>
11
12#include "wx_api.h"
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
22
25
28
31
35
38typedef struct WXImage_t WXImage_t;
39
49WX_API int WXImage_FromFile(const char *fileName, WXImage_t **img_p);
50
60WX_API int WXImage_FromEncodedData(const uint8_t *data, size_t size, WXImage_t **img_p);
61
71WX_API int WXImage_FromColor(int width, int height,
72 uint8_t r, uint8_t g, uint8_t b,
73 WXImage_t **img_p);
74
84WX_API int WXImage_FromBuffer(int width, int height,
85 const uint8_t *rgbData,
86 WXImage_t **img_p);
87
89WX_API void WXImage_Release(WXImage_t *img);
90
92WX_API int WXImage_ToFile(WXImage_t *img, const char *fileName);
93
110 const char *imgType, /* "jpg" or "png" */
111 uint8_t *encodedData,
112 size_t encodedDataCapcity,
113 size_t *encodedDataSize);
114
116WX_API int WXImage_Width(WXImage_t *img);
117
119WX_API int WXImage_Height(WXImage_t *img);
120
122WX_API uint8_t *WXImage_Data(WXImage_t *img);
123
126
127#ifdef __cplusplus
128}
129#endif
130
131#endif // WX_IMAGE_C_API_H_
WX_API int WXImage_FromEncodedData(const uint8_t *data, size_t size, WXImage_t **img_p)
WX_API int WXImage_FromColor(int width, int height, uint8_t r, uint8_t g, uint8_t b, WXImage_t **img_p)
WX_API int WXImage_ToEncodedData(WXImage_t *img, const char *imgType, uint8_t *encodedData, size_t encodedDataCapcity, size_t *encodedDataSize)
struct WXImage_t WXImage_t
Definition: wx_image_c_api.h:38
WX_API int WXImage_Height(WXImage_t *img)
WX_API int WXImage_FromBuffer(int width, int height, const uint8_t *rgbData, WXImage_t **img_p)
WX_API uint8_t * WXImage_Data(WXImage_t *img)
WXImageDataFormat_e
Definition: wx_image_c_api.h:19
@ WXImgDF_RGBA
Definition: wx_image_c_api.h:27
@ WXImgDF_RGB
Definition: wx_image_c_api.h:24
@ WXImgDF_ALPHA8
Definition: wx_image_c_api.h:30
@ WXImgDF_UNK
Definition: wx_image_c_api.h:21
@ WXImgDF_FLOAT32
Definition: wx_image_c_api.h:33
WX_API void WXImage_Release(WXImage_t *img)
WX_API WXImageDataFormat_e WXImage_DataFormat(WXImage_t *img)
WX_API int WXImage_Width(WXImage_t *img)
WX_API int WXImage_ToFile(WXImage_t *img, const char *fileName)
WX_API int WXImage_FromFile(const char *fileName, WXImage_t **img_p)