15 lines
323 B
C
15 lines
323 B
C
#ifndef IMAGE_LOADER_H
|
|
#define IMAGE_LOADER_H
|
|
|
|
#include "image.h"
|
|
#include <stdlib.h>
|
|
|
|
typedef struct image_decoder {
|
|
const char *name;
|
|
int (*can_decode)(const uint8_t *data, size_t size);
|
|
image_t* (*decode)(const uint8_t *data, size_t size);
|
|
void (*destroy)(struct image_decoder *self);
|
|
} image_decoder_t;
|
|
|
|
#endif
|