backported imago from eradicate
[dosdemo] / src / image.h
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
3
4 #include "inttypes.h"
5
6 struct image {
7         int width, height;
8         uint16_t *pixels;
9
10         /* optional animation data */
11         float cur_dur, frame_interval;
12         int cur_frame, num_frames;
13         float *uoffs, *voffs;
14 };
15
16 int load_image(struct image *img, const char *fname);
17 int dump_image(struct image *img, const char *fname);
18 void destroy_image(struct image *img);
19
20 int load_cubemap(struct image *cube, const char *fname_fmt);
21 void destroy_cubemap(struct image *cube);
22
23 #endif  /* IMAGE_H_ */