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
105 WINPR_API
int winpr_bitmap_write(
const char* filename,
const BYTE* data,
size_t width,
106 size_t height,
size_t bpp);
122 WINPR_API
int winpr_bitmap_write_ex(
const char* filename,
const BYTE* data,
size_t stride,
123 size_t width,
size_t height,
size_t bpp);
125 WINPR_API BYTE* winpr_bitmap_construct_header(
size_t width,
size_t height,
size_t bpp);
128 WINPR_API
int winpr_image_write(
wImage* image,
const char* filename);
131 WINPR_API
int winpr_image_write_ex(
wImage* image, UINT32 format,
const char* filename);
134 WINPR_API
int winpr_image_read(
wImage* image,
const char* filename);
147 WINPR_ATTR_MALLOC(free, 1)
149 WINPR_API
void* winpr_image_write_buffer(
wImage* image, UINT32 format,
size_t* size);
152 WINPR_API
int winpr_image_read_buffer(
wImage* image, const BYTE* buffer,
size_t size);
154 WINPR_API
void winpr_image_free(
wImage* image, BOOL bFreeBuffer);
156 WINPR_ATTR_MALLOC(winpr_image_free, 1)
157 WINPR_API
wImage* winpr_image_new(
void);
168 WINPR_API BOOL winpr_image_format_is_supported(UINT32 format);
179 WINPR_API const
char* winpr_image_format_extension(UINT32 format);
190 WINPR_API const
char* winpr_image_format_mime(UINT32 format);
203 WINPR_API BOOL winpr_image_equal(const
wImage* imageA, const
wImage* imageB, UINT32 flags);