Iridescence 1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_jpeg.h
1/* Copyright (C) 2017 - 2024, Thornwave Labs Inc - All Rights Reserved.
2 * Unauthorized copying of this file, via any medium is strictly prohibited.
3 * Proprietary and confidential.
4 * Written by Razvan Turiac <razvan.turiac@thornwave.com>
5*/
6
7#ifndef _DS_JPEG_H
8#define _DS_JPEG_H
9
10
11#include <stdint.h>
12#include <stddef.h>
13
14#include <ds_surface.h>
15
16
17typedef enum
18{
19 JPEG_STATUS_SUCCESS = 0,
20 JPEG_STATUS_INVALID,
21 JPEG_STATUS_UNSUPPORTED,
22 JPEG_STATUS_INVALID_SURFACE,
23}ds_jpeg_sts_t;
24
25
26typedef enum
27{
28 JPEG_COLORSPACE_YUV444 = 0,
29 JPEG_COLORSPACE_YUV422,
30 JPEG_COLORSPACE_YUV420,
31 JPEG_COLORSPACE_GRAYSCALE,
32 JPEG_COLORSPACE_CMYK
33}ds_jpeg_color_space_t;
34
35
36typedef struct
37{
38 int32_t width;
39 int32_t height;
40
41 ds_jpeg_color_space_t color_space;
43
44
45
53DsSurface* ds_create_surface_from_jpg(const void* source, size_t size);
54
55
64bool ds_update_surface_from_jpg(const void *source, size_t size, DsSurface &surface);
65
66#endif
DsSurface is a class that represents a drawing surface.
Definition ds_surface.h:30
Definition ds_jpeg.h:37