20#include <freerdp/config.h>
22#include <winpr/stream.h>
23#include <winpr/image.h>
25#include <freerdp/codec/color.h>
27#include <freerdp/codec/jpeg.h>
32BOOL jpeg_decompress(
const BYTE* input, BYTE* output,
int width,
int height,
int size,
int bpp)
39 wImage* image = winpr_image_new();
43 if (winpr_image_read_buffer(image, input, size) <= 0)
46 if ((image->width != width) || (image->height != height) || (image->bitsPerPixel != bpp))
49 memcpy(output, image->data, 1ull * image->scanline * image->height);
53 winpr_image_free(image, TRUE);
59BOOL jpeg_decompress(WINPR_ATTR_UNUSED
const BYTE* input, WINPR_ATTR_UNUSED BYTE* output,
60 WINPR_ATTR_UNUSED
int width, WINPR_ATTR_UNUSED
int height,
61 WINPR_ATTR_UNUSED
int size, WINPR_ATTR_UNUSED
int bpp)
63 WLog_ERR(
"TODO",
"TODO: implement");