1#ifndef ULEPNG_H
2#define ULEPNG_H
3
4#include <stddef.h>
5
6typedef enum {
7 ULEPNG_ERR_NONE,
8 ULEPNG_ERR_FAIL,
9
10 ULEPNG_ERR_FOPEN,
11 ULEPNG_ERR_OOM,
12
13 ULEPNG_ERR_LAST
14} UlePNGErr;
15
16typedef struct {
17 unsigned char* data;
18 size_t size;
19 UlePNGErr err;
20} ulepng;
21
22/* Initialise a ulepng with 0 values */
23ulepng ulepng_init(void);
24
25/* Initialise a ulepng with an image loaded from disk */
26ulepng ulepng_init_file(const char* path);
27
28/* Load an image from disk into png */
29void ulepng_load_file(ulepng* png, const char* path);
30
31
32#endif /* ULEPNG_H */
33