blob: 7ae8e8728dc85cf85210ee449827e6fb9a25623d [file] [log] [blame]
Wayne Xia5042ca52011-07-08 11:02:09 +08001#ifndef BMP_H
2#define BMP_H
3#include "types.h"
4
5struct bmp_decdata {
6 struct tagRGBQUAD *quadp;
7 unsigned char *datap;
8 int width;
9 int height;
10 int bpp;
11};
12
13/* allocate decdata struct */
14struct bmp_decdata *bmp_alloc(void);
15
16/* extract information from bmp file data */
17int bmp_decode(struct bmp_decdata *bmp, unsigned char *data, int data_size);
18
19/* get bmp properties */
20void bmp_get_size(struct bmp_decdata *bmp, int *width, int *height);
21
22/* flush flat picture data to *pc */
23int bmp_show(struct bmp_decdata *bmp, unsigned char *pic, int width
24 , int height, int depth, int bytes_per_line_dest);
25#endif