gif_loader/gif_loader.h

38 lines
534 B
C
Raw Normal View History

2022-12-10 17:06:57 +01:00
#ifndef GIF_LOADER_H
#define GIF_LOADER_H
#include "core/object/reference.h"
2022-12-10 17:14:50 +01:00
#include "core/io/image.h"
2022-12-10 18:34:58 +01:00
struct GIF_WHDR;
2022-12-10 17:06:57 +01:00
class GIFLoader : public Reference {
2022-12-10 18:34:58 +01:00
GDCLASS(GIFLoader, Reference);
2022-12-10 17:14:50 +01:00
2022-12-10 17:06:57 +01:00
public:
2022-12-10 18:34:58 +01:00
Array get_images();
void load_gif(const String &file);
2022-12-10 17:14:50 +01:00
GIFLoader();
~GIFLoader();
private:
static void _bind_methods();
2022-12-10 18:34:58 +01:00
static void gif_frame(void *data, struct GIF_WHDR *whdr);
Array _images;
Vector<uint8_t> data;
PoolByteArray pictd;
PoolByteArray prevd;
unsigned long size;
unsigned long last;
2022-12-10 17:06:57 +01:00
};
2022-12-10 18:34:58 +01:00
#endif