-
Notifications
You must be signed in to change notification settings - Fork 3
/
io_png.h
51 lines (38 loc) · 1.85 KB
/
io_png.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*----------------------------------------------------------------------------
RHF - Ray Histogram Fusion
Copyright (c) 2013, A. Buades <[email protected]>,
M. Delbracio <[email protected]>,
J-M. Morel <[email protected]>,
P. Muse <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
----------------------------------------------------------------------------*/
#ifndef _IO_PNG_H
#define _IO_PNG_H
#ifdef __cplusplus
extern "C" {
#endif
#define IO_PNG_VERSION "0.20110825"
#include <stddef.h>
/* io_png.c */
char *io_png_info(void);
unsigned char *io_png_read_u8(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp);
unsigned char *io_png_read_u8_rgb(const char *fname, size_t *nxp, size_t *nyp);
unsigned char *io_png_read_u8_gray(const char *fname, size_t *nxp, size_t *nyp);
float *io_png_read_f32(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp);
float *io_png_read_f32_rgb(const char *fname, size_t *nxp, size_t *nyp);
float *io_png_read_f32_gray(const char *fname, size_t *nxp, size_t *nyp);
int io_png_write_u8(const char *fname, const unsigned char *data, size_t nx, size_t ny, size_t nc);
int io_png_write_f32(const char *fname, const float *data, size_t nx, size_t ny, size_t nc);
#ifdef __cplusplus
}
#endif
#endif /* !_IO_PNG_H */