35 lines
493 B
C
35 lines
493 B
C
#ifndef IMAGE_H
|
|
#define IMAGE_H
|
|
|
|
#include "mem_allocator.h"
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif // __cplusplus
|
|
|
|
#include "aliases.h"
|
|
|
|
typedef struct pixel Pixel;
|
|
struct pixel {
|
|
u8 r;
|
|
u8 g;
|
|
u8 b;
|
|
u8 a;
|
|
};
|
|
|
|
typedef struct image Image;
|
|
struct image {
|
|
u64 width;
|
|
u64 height;
|
|
u64 buf_length;
|
|
Pixel data[];
|
|
};
|
|
|
|
Image *create_image(u64 width, u64 height, Pixel *data,
|
|
const Allocator *allocator);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif // __cplusplus
|
|
|
|
#endif // !IMAGE_H
|