forked from z64tools/ext_lib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_texel.h
More file actions
31 lines (25 loc) · 735 Bytes
/
ext_texel.h
File metadata and controls
31 lines (25 loc) · 735 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef EXT_TEXEL_H
#define EXT_TEXEL_H
#include <ext_lib.h>
#include <ext_vector.h>
typedef struct {
char key[20];
int x, y;
int channels;
uint8_t* data;
u32 size;
int compress;
char type; // n: new, l: load, m: memory, 'r': mem raw
struct {
bool throwError : 1;
};
} Image;
Image Image_New(void);
void Image_Load(Image* this, const char* file);
void Image_Save(Image* this, const char* file);
void Image_LoadMem(Image* this, const void* data, size_t size);
void Image_FromRaw(Image* this, const void* data, int x, int y, int channels);
void Image_Alloc(Image* this, int x, int y, int channels);
void Image_Free(Image* this);
void Image_Downscale(Image* this, int newx, int newy);
#endif