#ifndef GUARD_6AEC99B12E1F76DC4E50DC199E93CDB5
#define GUARD_6AEC99B12E1F76DC4E50DC199E93CDB5

#include "color32.h"
#include "color8.h"
#include "vec2i.h"

struct sw_image8 {
	struct sw_vec2i size;
	sw_color8 *_data;
	sw_color32 palette[256];
};

struct sw_image8 *sw_image8_create(struct sw_vec2i size);
void sw_image8_destroy(struct sw_image8 *image);

struct sw_image8 *sw_image8_load_png(char *path);
struct sw_image8 *sw_image8_load_png_data(u8 *data, u32 data_len);

sw_color8 sw_image8_get(struct sw_image8 *image, struct sw_vec2i pos);

#endif /* GUARD_6AEC99B12E1F76DC4E50DC199E93CDB5 */
