Meanshift  1.0
io_png.h
1 #ifndef _IO_PNG_H
2 #define _IO_PNG_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #define IO_PNG_VERSION "0.20110608"
9 
10 #include <stddef.h>
11 #include <string.h>
12 
13  unsigned char *io_png_read_u8(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp);
14  unsigned char *io_png_read_u8_rgb(const char *fname, size_t *nxp, size_t *nyp);
15  unsigned char *io_png_read_u8_gray(const char *fname, size_t *nxp, size_t *nyp);
16  float *io_png_read_f32(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp);
17  float *io_png_read_f32_rgb(const char *fname, size_t *nxp, size_t *nyp);
18  float *io_png_read_f32_gray(const char *fname, size_t *nxp, size_t *nyp);
19  int io_png_write_u8(const char *fname, const unsigned char *data, size_t nx, size_t ny, size_t nc);
20  int io_png_write_f32(const char *fname, const float *data, size_t nx, size_t ny, size_t nc);
21 
22 #ifdef __cplusplus
23 }
24 #endif
25 
26 #endif /* !_IO_PNG_H */
float * io_png_read_f32_gray(const char *fname, size_t *nxp, size_t *nyp)
read a PNG file into a 32bit float array, converted to gray
Definition: io_png.c:415
unsigned char * io_png_read_u8_rgb(const char *fname, size_t *nxp, size_t *nyp)
read a PNG file into a 8bit integer array, converted to RGB
Definition: io_png.c:268
unsigned char * io_png_read_u8(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp)
read a PNG file into a 8bit integer array
Definition: io_png.c:255
float * io_png_read_f32(const char *fname, size_t *nxp, size_t *nyp, size_t *ncp)
read a PNG file into a 32bit float array
Definition: io_png.c:364
int io_png_write_f32(const char *fname, const float *data, size_t nx, size_t ny, size_t nc)
write a float array into a PNG file
Definition: io_png.c:669
float * io_png_read_f32_rgb(const char *fname, size_t *nxp, size_t *nyp)
read a PNG file into a 32bit float array, converted to RGB
Definition: io_png.c:376
int io_png_write_u8(const char *fname, const unsigned char *data, size_t nx, size_t ny, size_t nc)
write a 8bit unsigned integer array into a PNG file
Definition: io_png.c:650
unsigned char * io_png_read_u8_gray(const char *fname, size_t *nxp, size_t *nyp)
read a PNG file into a 8bit integer array, converted to gray
Definition: io_png.c:310