Prototyped image decoder interface

This commit is contained in:
Pedro Portela 2025-06-10 07:35:02 +02:00
parent 257cd65412
commit c805907817

14
common/image_loader.h Normal file
View 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