Revision 7464d0e7083dd9680285c3b17c4e784d584d06eb authored by Software Heritage on 10 October 2014, 00:00:00 UTC, committed by Software Heritage on 15 October 2014, 00:00:00 UTC
0 parent
Raw File
io_png.h
#ifndef _IO_PNG_H
#define _IO_PNG_H

#ifdef __cplusplus
extern "C" {
#endif

#define IO_PNG_VERSION "0.20130128"

#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);

void rgb_to_gray(const float *ptr_r, const float *ptr_g, const float *ptr_b,
                 size_t nxp, size_t nyp,
                 float *ptr_gray);

#ifdef __cplusplus
}
#endif

#endif /* !_IO_PNG_H */
back to top