Huge change, and it's almost working, too :)
[libopano.git] / src / utils_image.h
1 /*
2  *  Copyright (C) 2007  Florian octo Forster <octo at verplant.org>
3  *
4  *  This program is free software; you can redistribute it and/or modify it
5  *  under the terms of the GNU General Public License as published by the Free
6  *  Software Foundation; either version 2 of the License, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful, but
10  *  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11  *  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  *  for more details.
13  *
14  *  You should have received a copy of the GNU General Public License along
15  *  with this program; if not, write to the Free Software Foundation, Inc., 51
16  *  Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  **/
18
19 #ifndef UTILS_IMAGE_H
20 #define UTILS_IMAGE_H 1
21
22 #include <stdint.h>
23
24 enum ui_image_type
25 {
26         UIT_BW,
27         UIT_RGB
28 };
29
30 struct ui_image_s
31 {
32         uint32_t width;
33         uint32_t height;
34
35         uint8_t **data;
36         enum ui_image_type type;
37 };
38 typedef struct ui_image_s ui_image_t;
39
40 ui_image_t *ui_create (uint32_t width, uint32_t height);
41 ui_image_t *ui_create_file (const char *file);
42 void ui_destroy (ui_image_t *);
43
44 #endif /* UTILS_IMAGE_H */
45