Mercurial > mplayer.hg
comparison pnm_loader.h @ 32427:58232aeb3fdd
Move the read_pnm function into a separate file.
author | cigaes |
---|---|
date | Mon, 18 Oct 2010 20:44:04 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
32426:fbee56276c87 | 32427:58232aeb3fdd |
---|---|
1 /* | |
2 * PNM image files loader | |
3 * | |
4 * This file is part of MPlayer. | |
5 * | |
6 * MPlayer is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * MPlayer is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License along | |
17 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
19 * | |
20 * You can alternatively redistribute this file and/or | |
21 * modify it under the terms of the GNU Lesser General Public | |
22 * License as published by the Free Software Foundation; either | |
23 * version 2.1 of the License, or (at your option) any later version. | |
24 */ | |
25 | |
26 #ifndef MPLAYER_PNM_LOADER_H | |
27 #define MPLAYER_PNM_LOADER_H | |
28 | |
29 #include <stdio.h> | |
30 #include <stdint.h> | |
31 | |
32 /** | |
33 * Read a "portable anymap" image. | |
34 * Supports raw PGM (P5) and PNM (P6). | |
35 * | |
36 * @param[in] f input stream. | |
37 * @param[out] width width of the loaded image. | |
38 * @param[out] height height of the loaded image. | |
39 * @param[out] bytes_per_pixel format of the loaded image. | |
40 * @param[out] maxval maximum pixel value; possible values are: | |
41 * 1 for 8 bits gray, | |
42 * 2 for 16 bits gray, | |
43 * 3 for 8 bits per component RGB, | |
44 * 6 for 16 bits per component RGB. | |
45 * @return a newly allocated array of | |
46 * width*height*bytes_per_pixel bytes, | |
47 * or NULL in case of error. | |
48 */ | |
49 uint8_t *read_pnm(FILE *f, int *width, int *height, | |
50 int *bytes_per_pixel, int *maxval); | |
51 | |
52 #endif /* MPLAYER_PNM_LOADER_H */ |