]> git.draconx.ca Git - liblbx.git/blob - src/image.h
Trivial manual fixes.
[liblbx.git] / src / image.h
1 #ifndef LBXIMG_H_
2 #define LBXIMG_H_
3
4 #include <stdio.h>
5
6 struct lbx_file_ops;
7
8 struct lbx_image {
9         unsigned short width, height;
10         unsigned char frames, chunk, leadin;
11 };
12
13 struct lbx_colour {
14         unsigned char red, green, blue, active;
15 };
16
17 struct lbx_image *lbx_img_open(void *f, const struct lbx_file_ops *fops,
18                                int (*destructor)(void *));
19 struct lbx_image *lbx_img_fopen(const char *file);
20 int     lbx_img_close(struct lbx_image *img);
21
22 int lbx_img_seek(struct lbx_image *img, unsigned frame);
23 long lbx_img_read_row_header(struct lbx_image *img, unsigned *x, unsigned *y);
24 long lbx_img_read_row_data(struct lbx_image *img, void *buf);
25
26 int lbx_img_getpalette(struct lbx_image *img, struct lbx_colour *palette);
27 int lbx_img_loadpalette(void *f, const struct lbx_file_ops *fops,
28                         struct lbx_colour *palette);
29
30 #endif