23 #include <winpr/winpr.h>
24 #include <winpr/wtypes.h>
46 INT32 biXPelsPerMeter;
47 INT32 biYPelsPerMeter;
49 UINT32 biClrImportant;
66 #define WINPR_IMAGE_BITMAP 0
67 #define WINPR_IMAGE_PNG 1
68 #define WINPR_IMAGE_JPEG 2
69 #define WINPR_IMAGE_WEBP 3
72 #define WINPR_IMAGE_BMP_HEADER_LEN 54
91 WINPR_IMAGE_CMP_NO_FLAGS = 0,
92 WINPR_IMAGE_CMP_IGNORE_DEPTH = 1,
93 WINPR_IMAGE_CMP_IGNORE_ALPHA = 2,
94 WINPR_IMAGE_CMP_FUZZY = 4
104 WINPR_API
int winpr_bitmap_write(
const char* filename,
const BYTE* data,
size_t width,
105 size_t height,
size_t bpp);
120 WINPR_API
int winpr_bitmap_write_ex(
const char* filename,
const BYTE* data,
size_t stride,
121 size_t width,
size_t height,
size_t bpp);
122 WINPR_API BYTE* winpr_bitmap_construct_header(
size_t width,
size_t height,
size_t bpp);
124 WINPR_API
int winpr_image_write(
wImage* image,
const char* filename);
125 WINPR_API
int winpr_image_write_ex(
wImage* image, UINT32 format,
const char* filename);
126 WINPR_API
int winpr_image_read(
wImage* image,
const char* filename);
139 WINPR_ATTR_MALLOC(free, 1)
140 WINPR_API
void* winpr_image_write_buffer(
wImage* image, UINT32 format,
size_t* size);
141 WINPR_API
int winpr_image_read_buffer(
wImage* image, const BYTE* buffer,
size_t size);
143 WINPR_API
void winpr_image_free(
wImage* image, BOOL bFreeBuffer);
145 WINPR_ATTR_MALLOC(winpr_image_free, 1)
146 WINPR_API
wImage* winpr_image_new(
void);
156 WINPR_API BOOL winpr_image_format_is_supported(UINT32 format);
166 WINPR_API const
char* winpr_image_format_extension(UINT32 format);
176 WINPR_API const
char* winpr_image_format_mime(UINT32 format);
188 WINPR_API BOOL winpr_image_equal(const
wImage* imageA, const
wImage* imageB, UINT32 flags);