Prototyped image decoder interface
This commit is contained in:
parent
257cd65412
commit
c805907817
14
common/image_loader.h
Normal file
14
common/image_loader.h
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#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
|
Loading…
x
Reference in New Issue
Block a user